downgrade notifications
This commit is contained in:
@@ -797,14 +797,13 @@ def handle_send_email_failed_cancel(
|
||||
@app.task
|
||||
def handle_send_email_subscription_update(
|
||||
username, useremail, planname, recurring, price, amount,
|
||||
end_of_billing_period, **kwargs):
|
||||
end_of_billing_period, method, **kwargs):
|
||||
|
||||
if 'debug' in kwargs:
|
||||
debug = kwargs['debug']
|
||||
else:
|
||||
debug = True
|
||||
|
||||
subject = "Rowsandall Payment Confirmation"
|
||||
|
||||
from_email = 'Rowsandall <admin@rowsandall.com>'
|
||||
|
||||
@@ -818,14 +817,23 @@ def handle_send_email_subscription_update(
|
||||
'end_of_billing_period': end_of_billing_period,
|
||||
}
|
||||
|
||||
if method == 'down':
|
||||
template_name = 'subscription_downgrade_email.html'
|
||||
notification_template_name = 'subscription_downgrade_notification.html'
|
||||
subject = "Rowsandall Change Confirmation"
|
||||
else:
|
||||
template_name = 'subscription_update_email.html'
|
||||
notification_template_name = 'subscription_update_notification.html'
|
||||
subject = "Rowsandall Payment Confirmation"
|
||||
|
||||
res = send_template_email(from_email,[useremail],
|
||||
subject,
|
||||
'subscription_update_email.html',
|
||||
template_name,
|
||||
d, **kwargs)
|
||||
|
||||
res = send_template_email(from_email,['info@rowsandall.com'],
|
||||
'Subscription Update Notification',
|
||||
'subscription_update_notification.html',
|
||||
template_name,
|
||||
d, **kwargs)
|
||||
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user