Browse Source

only refund captured charges

pull/556/head
Kyle Spearrin 6 years ago
parent
commit
41f9f6a7f0
  1. 2
      src/Core/Services/Implementations/StripePaymentService.cs

2
src/Core/Services/Implementations/StripePaymentService.cs

@ -742,7 +742,7 @@ namespace Bit.Core.Services @@ -742,7 +742,7 @@ namespace Bit.Core.Services
if(charges?.Data != null)
{
var refundService = new RefundService();
foreach(var charge in charges.Data.Where(c => !c.Refunded))
foreach(var charge in charges.Data.Where(c => c.Captured.GetValueOrDefault() && !c.Refunded))
{
await refundService.CreateAsync(new RefundCreateOptions { ChargeId = charge.Id });
}

Loading…
Cancel
Save