1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-06 13:38:13 -05:00

only refund captured charges

This commit is contained in:
Kyle Spearrin 2019-08-12 10:33:06 -04:00
parent 157cafa551
commit 41f9f6a7f0

View File

@ -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 });
}