From 738e308ee40374c1a01b30eb5f8f5fb2808c669a Mon Sep 17 00:00:00 2001 From: Cy Okeke Date: Sat, 10 Aug 2024 13:10:20 +0100 Subject: [PATCH] Remove the feature flag Signed-off-by: Cy Okeke --- src/Core/Constants.cs | 1 - src/Core/Services/Implementations/StripePaymentService.cs | 7 +++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Core/Constants.cs b/src/Core/Constants.cs index 445882780479..e620f1eda917 100644 --- a/src/Core/Constants.cs +++ b/src/Core/Constants.cs @@ -108,7 +108,6 @@ public static class FeatureFlagKeys public const string ItemShare = "item-share"; public const string KeyRotationImprovements = "key-rotation-improvements"; public const string DuoRedirect = "duo-redirect"; - public const string PM5864DollarThreshold = "PM-5864-dollar-threshold"; public const string ShowPaymentMethodWarningBanners = "show-payment-method-warning-banners"; public const string AC2101UpdateTrialInitiationEmail = "AC-2101-update-trial-initiation-email"; public const string EnableConsolidatedBilling = "enable-consolidated-billing"; diff --git a/src/Core/Services/Implementations/StripePaymentService.cs b/src/Core/Services/Implementations/StripePaymentService.cs index 2fa84ef3519a..cb66d5c51170 100644 --- a/src/Core/Services/Implementations/StripePaymentService.cs +++ b/src/Core/Services/Implementations/StripePaymentService.cs @@ -715,19 +715,18 @@ private async Task FinalizeSubscriptionChangeAsync(ISubscriber subscribe var daysUntilDue = sub.DaysUntilDue; var chargeNow = collectionMethod == "charge_automatically"; var updatedItemOptions = subscriptionUpdate.UpgradeItemsOptions(sub); - var isPm5864DollarThresholdEnabled = _featureService.IsEnabled(FeatureFlagKeys.PM5864DollarThreshold); var isAnnualPlan = sub?.Items?.Data.FirstOrDefault()?.Plan?.Interval == "year"; var subUpdateOptions = new SubscriptionUpdateOptions { Items = updatedItemOptions, - ProrationBehavior = !isPm5864DollarThresholdEnabled || invoiceNow + ProrationBehavior = invoiceNow ? Constants.AlwaysInvoice : Constants.CreateProrations, DaysUntilDue = daysUntilDue ?? 1, CollectionMethod = "send_invoice" }; - if (!invoiceNow && isAnnualPlan && isPm5864DollarThresholdEnabled && sub.Status.Trim() != "trialing") + if (!invoiceNow && isAnnualPlan && sub.Status.Trim() != "trialing") { subUpdateOptions.PendingInvoiceItemInterval = new SubscriptionPendingInvoiceItemIntervalOptions { Interval = "month" }; @@ -761,7 +760,7 @@ private async Task FinalizeSubscriptionChangeAsync(ISubscriber subscribe { try { - if (!isPm5864DollarThresholdEnabled && !invoiceNow) + if (!invoiceNow) { if (chargeNow) {