1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-08 19:34:09 -05:00

resolve the issue with changes of payment method (#3976)

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
This commit is contained in:
cyprain-okeke
2024-04-11 15:19:28 +01:00
committed by GitHub
parent 0a43d8335d
commit 736a6f19a5

View File

@ -844,10 +844,13 @@ public class StripePaymentService : IPaymentService
if (invoice.AmountDue > 0 && updatedItemOptions.Any(i => i.Quantity > 0))
{
try
{
if (!isPm5864DollarThresholdEnabled && !invoiceNow)
{
if (chargeNow)
{
paymentIntentClientSecret = await PayInvoiceAfterSubscriptionChangeAsync(subscriber, invoice);
paymentIntentClientSecret =
await PayInvoiceAfterSubscriptionChangeAsync(subscriber, invoice);
}
else
{
@ -857,6 +860,7 @@ public class StripePaymentService : IPaymentService
paymentIntentClientSecret = null;
}
}
}
catch
{
// Need to revert the subscription