Cancel SEPA subscriptions when payments fail
This commit is contained in:
parent
ba314eb647
commit
44403c94c2
1 changed files with 6 additions and 0 deletions
|
@ -406,6 +406,12 @@ func (c *StripeController) handlePaymentIntentFailed(event stripe.Event, country
|
|||
if err != nil {
|
||||
return ente.StripeEventLog{}, stacktrace.Propagate(err, "")
|
||||
}
|
||||
|
||||
err = c.BillingRepo.UpdateSubscriptionCancellationStatus(userID, true)
|
||||
if err != nil {
|
||||
return ente.StripeEventLog{}, stacktrace.Propagate(err, "")
|
||||
}
|
||||
|
||||
err = c.sendAccountOnHoldEmail(userID)
|
||||
if err != nil {
|
||||
return ente.StripeEventLog{}, stacktrace.Propagate(err, "")
|
||||
|
|
Loading…
Add table
Reference in a new issue