mirror of
https://github.com/bitwarden/server.git
synced 2025-02-23 03:01:23 +01:00
resolve the issue with changes of payment method (#3976)
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
This commit is contained in:
parent
0a43d8335d
commit
736a6f19a5
@ -845,16 +845,20 @@ public class StripePaymentService : IPaymentService
|
||||
{
|
||||
try
|
||||
{
|
||||
if (chargeNow)
|
||||
if (!isPm5864DollarThresholdEnabled && !invoiceNow)
|
||||
{
|
||||
paymentIntentClientSecret = await PayInvoiceAfterSubscriptionChangeAsync(subscriber, invoice);
|
||||
}
|
||||
else
|
||||
{
|
||||
invoice = await _stripeAdapter.InvoiceFinalizeInvoiceAsync(subResponse.LatestInvoiceId,
|
||||
new InvoiceFinalizeOptions { AutoAdvance = false, });
|
||||
await _stripeAdapter.InvoiceSendInvoiceAsync(invoice.Id, new InvoiceSendOptions());
|
||||
paymentIntentClientSecret = null;
|
||||
if (chargeNow)
|
||||
{
|
||||
paymentIntentClientSecret =
|
||||
await PayInvoiceAfterSubscriptionChangeAsync(subscriber, invoice);
|
||||
}
|
||||
else
|
||||
{
|
||||
invoice = await _stripeAdapter.InvoiceFinalizeInvoiceAsync(subResponse.LatestInvoiceId,
|
||||
new InvoiceFinalizeOptions { AutoAdvance = false, });
|
||||
await _stripeAdapter.InvoiceSendInvoiceAsync(invoice.Id, new InvoiceSendOptions());
|
||||
paymentIntentClientSecret = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
|
Loading…
Reference in New Issue
Block a user