[MM-30984] Missing payment email on billing day if no CC is present (#16442)
* Adding email and scaffolding for payment failure in case where customer has not added payment method * Adding email template * Remove unused boolean * Fix error * Add Email Us verbiage Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
16
app/cloud.go
16
app/cloud.go
@@ -75,3 +75,19 @@ func (a *App) SendPaymentFailedEmail(failedPayment *model.FailedPayment) *model.
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// SendNoCardPaymentFailedEmail
|
||||
func (a *App) SendNoCardPaymentFailedEmail() *model.AppError {
|
||||
sysAdmins, err := a.getSysAdminsEmailRecipients()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, admin := range sysAdmins {
|
||||
err := a.Srv().EmailService.SendNoCardPaymentFailedEmail(admin.Email, admin.Locale, *a.Config().ServiceSettings.SiteURL)
|
||||
if err != nil {
|
||||
a.Log().Error("Error sending payment failed email", mlog.Err(err))
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user