1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-21 12:05:42 +01:00

PM-11602 | Error toast when expired org attempts to auto scale is unclear (#4746)

This commit is contained in:
Jonas Hendrickx 2024-09-30 12:35:14 +02:00 committed by GitHub
parent 793ef3aab8
commit 81190c1bdf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -783,6 +783,11 @@ public class StripePaymentService : IPaymentService
throw new GatewayException("Subscription not found.");
}
if (sub.Status == SubscriptionStatuses.Canceled)
{
throw new BadRequestException("You do not have an active subscription. Reinstate your subscription to make changes.");
}
var collectionMethod = sub.CollectionMethod;
var daysUntilDue = sub.DaysUntilDue;
var chargeNow = collectionMethod == "charge_automatically";