mirror of
https://github.com/ente-io/ente.git
synced 2025-08-07 23:18:10 +00:00
Depend on subscription-past-due events to trigger the account-on-hold email
This commit is contained in:
parent
b78a66a274
commit
a131c16f4e
@ -404,20 +404,6 @@ func (c *StripeController) handlePaymentIntentFailed(event stripe.Event, country
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return ente.StripeEventLog{}, stacktrace.Propagate(err, "")
|
return ente.StripeEventLog{}, stacktrace.Propagate(err, "")
|
||||||
}
|
}
|
||||||
// Send an email to the user
|
|
||||||
user, err := c.UserRepo.Get(userID)
|
|
||||||
if err != nil {
|
|
||||||
return ente.StripeEventLog{}, stacktrace.Propagate(err, "")
|
|
||||||
}
|
|
||||||
// TODO: Inform customer that payment_failed.html with invoice.HostedInvoiceURL
|
|
||||||
err = email.SendTemplatedEmail([]string{user.Email}, "ente", "support@ente.io",
|
|
||||||
ente.AccountOnHoldEmailSubject, ente.OnHoldTemplate, map[string]interface{}{
|
|
||||||
"PaymentProvider": "Stripe",
|
|
||||||
"InvoiceURL": invoice.HostedInvoiceURL,
|
|
||||||
}, nil)
|
|
||||||
if err != nil {
|
|
||||||
return ente.StripeEventLog{}, stacktrace.Propagate(err, "")
|
|
||||||
}
|
|
||||||
return ente.StripeEventLog{UserID: userID, StripeSubscription: *stripeSubscription, Event: event}, nil
|
return ente.StripeEventLog{UserID: userID, StripeSubscription: *stripeSubscription, Event: event}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user