Skip to content

Commit

Permalink
initial commit (#3874)
Browse files Browse the repository at this point in the history
Signed-off-by: Cy Okeke <[email protected]>
  • Loading branch information
cyprain-okeke authored Mar 7, 2024
1 parent 9d7e1cc commit 02d2abd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Core/Services/Implementations/StripePaymentService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,8 @@ private async Task<string> FinalizeSubscriptionChangeAsync(IStorableSubscriber s
SubscriptionBillingCycleAnchor = SubscriptionBillingCycleAnchor.Now
});

immediatelyInvoice = upcomingInvoiceWithChanges.AmountRemaining >= 50000;
var isAnnualPlan = sub?.Items?.Data.FirstOrDefault()?.Plan?.Interval == "year";
immediatelyInvoice = isAnnualPlan && upcomingInvoiceWithChanges.AmountRemaining >= 50000;

subUpdateOptions.BillingCycleAnchor = immediatelyInvoice
? SubscriptionBillingCycleAnchor.Now
Expand Down

0 comments on commit 02d2abd

Please sign in to comment.