1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-22 13:35:10 -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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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