File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/Billing/Services/Implementations Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ public async Task HandleAsync(Event parsedEvent)
6969
7070 var currentPeriodEnd = subscription . GetCurrentPeriodEnd ( ) ;
7171
72- if ( SubscriptionWentUnpaid ( parsedEvent , subscription ) )
72+ if ( SubscriptionWentUnpaidOrIncompleteExpired ( parsedEvent , subscription ) )
7373 {
7474 await DisableSubscriberAsync ( subscriberId , currentPeriodEnd ) ;
7575 await SetSubscriptionToCancelAsync ( subscription ) ;
@@ -96,7 +96,7 @@ await subscriberId.Match(
9696 _ => Task . CompletedTask ) ;
9797 }
9898
99- private static bool SubscriptionWentUnpaid (
99+ private static bool SubscriptionWentUnpaidOrIncompleteExpired (
100100 Event parsedEvent ,
101101 Subscription currentSubscription ) =>
102102 parsedEvent . Data . PreviousAttributes . ToObject < Subscription > ( ) is Subscription
@@ -107,7 +107,8 @@ SubscriptionStatus.Active or
107107 SubscriptionStatus . PastDue
108108 } && currentSubscription is
109109 {
110- Status : SubscriptionStatus . Unpaid ,
110+ Status : SubscriptionStatus . Unpaid or
111+ SubscriptionStatus . IncompleteExpired ,
111112 LatestInvoice . BillingReason : BillingReasons . SubscriptionCreate or BillingReasons . SubscriptionCycle
112113 } ;
113114
You can’t perform that action at this time.
0 commit comments