Skip to content

Commit

Permalink
fix: check for PaymentStatus in checkout sync
Browse files Browse the repository at this point in the history
  • Loading branch information
rsbh committed Dec 20, 2024
1 parent 55338b3 commit 97b0c40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion billing/checkout/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ func (s *Service) SyncWithProvider(ctx context.Context, customerID string) error
break
}

if ch.State == StateExpired.String() || ch.State == StateComplete.String() {
if ch.State == StateExpired.String() || (ch.State == StateComplete.String() && ch.PaymentStatus != "unpaid") {
continue
}
if ch.ExpireAt.Before(time.Now()) {
Expand Down

0 comments on commit 97b0c40

Please sign in to comment.