mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 06:24:24 +01:00
Add ability to move a payout from InProgress to AwaitingPayment (#6564)
This commit is contained in:
@@ -439,7 +439,28 @@ namespace BTCPayServer.Controllers
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
case "mark-awaiting-payment":
|
||||
await using (var context = _dbContextFactory.CreateContext())
|
||||
{
|
||||
var payouts = (await PullPaymentHostedService.GetPayouts(new PullPaymentHostedService.PayoutQuery()
|
||||
{
|
||||
States = new[] { PayoutState.InProgress },
|
||||
Stores = new[] { storeId },
|
||||
PayoutIds = payoutIds
|
||||
}, context));
|
||||
foreach (var payout in payouts)
|
||||
{
|
||||
payout.State = PayoutState.AwaitingPayment;
|
||||
payout.Proof = null;
|
||||
}
|
||||
await context.SaveChangesAsync();
|
||||
}
|
||||
TempData.SetStatusMessageModel(new StatusMessageModel
|
||||
{
|
||||
Message = "Payout payments have been marked as awaiting payment",
|
||||
Severity = StatusMessageModel.StatusSeverity.Success
|
||||
});
|
||||
break;
|
||||
case "cancel":
|
||||
await _pullPaymentService.Cancel(
|
||||
new PullPaymentHostedService.CancelRequest(payoutIds, new[] { storeId }));
|
||||
|
||||
Reference in New Issue
Block a user