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
|
try
|
||||||
{
|
{
|
||||||
if (chargeNow)
|
if (!isPm5864DollarThresholdEnabled && !invoiceNow)
|
||||||
{
|
{
|
||||||
paymentIntentClientSecret = await PayInvoiceAfterSubscriptionChangeAsync(subscriber, invoice);
|
if (chargeNow)
|
||||||
}
|
{
|
||||||
else
|
paymentIntentClientSecret =
|
||||||
{
|
await PayInvoiceAfterSubscriptionChangeAsync(subscriber, invoice);
|
||||||
invoice = await _stripeAdapter.InvoiceFinalizeInvoiceAsync(subResponse.LatestInvoiceId,
|
}
|
||||||
new InvoiceFinalizeOptions { AutoAdvance = false, });
|
else
|
||||||
await _stripeAdapter.InvoiceSendInvoiceAsync(invoice.Id, new InvoiceSendOptions());
|
{
|
||||||
paymentIntentClientSecret = null;
|
invoice = await _stripeAdapter.InvoiceFinalizeInvoiceAsync(subResponse.LatestInvoiceId,
|
||||||
|
new InvoiceFinalizeOptions { AutoAdvance = false, });
|
||||||
|
await _stripeAdapter.InvoiceSendInvoiceAsync(invoice.Id, new InvoiceSendOptions());
|
||||||
|
paymentIntentClientSecret = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
|
Loading…
Reference in New Issue
Block a user