Skip to content

Commit

Permalink
PM-11602 | Error toast when expired org attempts to auto scale is unc…
Browse files Browse the repository at this point in the history
…lear (#4746)
  • Loading branch information
jonashendrickx authored Sep 30, 2024
1 parent 793ef3a commit 81190c1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Core/Services/Implementations/StripePaymentService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,11 @@ private async Task<string> FinalizeSubscriptionChangeAsync(ISubscriber subscribe
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";
Expand Down

0 comments on commit 81190c1

Please sign in to comment.