mirror of
https://github.com/bitwarden/server
synced 2025-12-16 00:03:54 +00:00
Resolve RisksSubscriptionFailure bugs (#3790)
This commit is contained in:
@@ -1738,13 +1738,17 @@ public class StripePaymentService : IPaymentService
|
||||
{
|
||||
var subscriptionInfo = await GetSubscriptionAsync(organization);
|
||||
|
||||
if (subscriptionInfo.Subscription is not { Status: "active" or "trialing" or "past_due" } ||
|
||||
subscriptionInfo.UpcomingInvoice == null)
|
||||
if (subscriptionInfo.Subscription is not
|
||||
{
|
||||
Status: "active" or "trialing" or "past_due",
|
||||
CollectionMethod: "charge_automatically"
|
||||
}
|
||||
|| subscriptionInfo.UpcomingInvoice == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var customer = await GetCustomerAsync(organization.GatewayCustomerId);
|
||||
var customer = await GetCustomerAsync(organization.GatewayCustomerId, GetCustomerPaymentOptions());
|
||||
|
||||
var paymentSource = await GetBillingPaymentSourceAsync(customer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user