diff --git a/src/Api/Utilities/ExceptionHandlerFilterAttribute.cs b/src/Api/Utilities/ExceptionHandlerFilterAttribute.cs
index c414a6d38c..004c324907 100644
--- a/src/Api/Utilities/ExceptionHandlerFilterAttribute.cs
+++ b/src/Api/Utilities/ExceptionHandlerFilterAttribute.cs
@@ -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);
}
}
diff --git a/src/Core/Core.csproj b/src/Core/Core.csproj
index 6cda7bf3c7..a30c225aa8 100644
--- a/src/Core/Core.csproj
+++ b/src/Core/Core.csproj
@@ -53,7 +53,7 @@
-
+
diff --git a/src/Core/Services/Implementations/StripePaymentService.cs b/src/Core/Services/Implementations/StripePaymentService.cs
index 2326544826..13c378676f 100644
--- a/src/Core/Services/Implementations/StripePaymentService.cs
+++ b/src/Core/Services/Implementations/StripePaymentService.cs
@@ -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 });
}