mirror of
https://github.com/bitwarden/server.git
synced 2025-01-22 21:51:22 +01:00
Update stripe lib (#793)
This commit is contained in:
parent
0f2ea43454
commit
f23a8edc45
@ -54,18 +54,17 @@ namespace Bit.Api.Utilities
|
||||
errorMessage = badRequestException.Message;
|
||||
}
|
||||
}
|
||||
else if (exception is StripeException stripeException &&
|
||||
stripeException?.StripeError?.ErrorType == "card_error")
|
||||
else if (exception is StripeException stripeException && stripeException?.StripeError?.Type == "card_error")
|
||||
{
|
||||
context.HttpContext.Response.StatusCode = 400;
|
||||
if (_publicApi)
|
||||
{
|
||||
publicErrorModel = new PublicApi.ErrorResponseModel(stripeException.StripeError.Parameter,
|
||||
publicErrorModel = new PublicApi.ErrorResponseModel(stripeException.StripeError.Param,
|
||||
stripeException.Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
internalErrorModel = new InternalApi.ErrorResponseModel(stripeException.StripeError.Parameter,
|
||||
internalErrorModel = new InternalApi.ErrorResponseModel(stripeException.StripeError.Param,
|
||||
stripeException.Message);
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,7 @@
|
||||
<PackageReference Include="System.Text.Json" Version="4.7.2" />
|
||||
<PackageReference Include="AspNetCoreRateLimit" Version="2.1.0" />
|
||||
<PackageReference Include="Braintree" Version="4.17.0" />
|
||||
<PackageReference Include="Stripe.net" Version="36.9.0" />
|
||||
<PackageReference Include="Stripe.net" Version="37.13.0" />
|
||||
<PackageReference Include="U2F.Core" Version="1.0.4" />
|
||||
<PackageReference Include="Otp.NET" Version="1.2.2" />
|
||||
<PackageReference Include="YubicoDotNetClient" Version="1.2.0" />
|
||||
|
@ -835,7 +835,7 @@ namespace Bit.Core.Services
|
||||
if (charges?.Data != null)
|
||||
{
|
||||
var refundService = new RefundService();
|
||||
foreach (var charge in charges.Data.Where(c => c.Captured.GetValueOrDefault() && !c.Refunded))
|
||||
foreach (var charge in charges.Data.Where(c => c.Captured && !c.Refunded))
|
||||
{
|
||||
await refundService.CreateAsync(new RefundCreateOptions { Charge = charge.Id });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user