From 81190c1bdf04072de4bc3dd02f20355c255dbd59 Mon Sep 17 00:00:00 2001 From: Jonas Hendrickx Date: Mon, 30 Sep 2024 12:35:14 +0200 Subject: [PATCH] PM-11602 | Error toast when expired org attempts to auto scale is unclear (#4746) --- src/Core/Services/Implementations/StripePaymentService.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Core/Services/Implementations/StripePaymentService.cs b/src/Core/Services/Implementations/StripePaymentService.cs index b31719a96..1720447b4 100644 --- a/src/Core/Services/Implementations/StripePaymentService.cs +++ b/src/Core/Services/Implementations/StripePaymentService.cs @@ -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";