confirmation emails to buyers
This commit is contained in:
117
rowers/tasks.py
117
rowers/tasks.py
@@ -739,7 +739,122 @@ def handle_updatedps(useremail, workoutids, debug=False,**kwargs):
|
||||
|
||||
return 1
|
||||
|
||||
# send email when a breakthrough workout is uploaded
|
||||
@app.task
|
||||
def handle_send_email_transaction(
|
||||
username, useremail, amount, **kwargs):
|
||||
|
||||
if 'debug' in kwargs:
|
||||
debug = kwargs['debug']
|
||||
else:
|
||||
debug = True
|
||||
|
||||
subject = "Rowsandall Payment Confirmation"
|
||||
|
||||
from_email = 'Rowsandall <admin@rowsandall.com>'
|
||||
|
||||
d = {
|
||||
'name': username,
|
||||
'siteurl': siteurl,
|
||||
'amount': amount
|
||||
}
|
||||
|
||||
res = send_template_email(from_email,[useremail],
|
||||
subject,
|
||||
'paymentconfirmationemail.html',
|
||||
d, **kwargs)
|
||||
|
||||
return 1
|
||||
|
||||
@app.task
|
||||
def handle_send_email_failed_cancel(
|
||||
name, email, username, id, **kwargs):
|
||||
|
||||
if 'debug' in kwargs:
|
||||
debug = kwargs['debug']
|
||||
else:
|
||||
debug = True
|
||||
|
||||
subject = "Rowsandall Subscription Cancellation Error"
|
||||
|
||||
from_email = 'Rowsandall <admin@rowsandall.com>'
|
||||
|
||||
d = {
|
||||
'name': name,
|
||||
'siteurl': siteurl,
|
||||
'email': email,
|
||||
'username': username,
|
||||
'id': id,
|
||||
}
|
||||
|
||||
res = send_template_email(from_email,["support@rowsandall.com"],
|
||||
subject,
|
||||
'cancel_subscription_fail_email.html',
|
||||
d, **kwargs)
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@app.task
|
||||
def handle_send_email_subscription_update(
|
||||
username, useremail, planname, recurring, price, amount,
|
||||
end_of_billing_period, **kwargs):
|
||||
|
||||
if 'debug' in kwargs:
|
||||
debug = kwargs['debug']
|
||||
else:
|
||||
debug = True
|
||||
|
||||
subject = "Rowsandall Payment Confirmation"
|
||||
|
||||
from_email = 'Rowsandall <admin@rowsandall.com>'
|
||||
|
||||
d = {
|
||||
'name': username,
|
||||
'siteurl': siteurl,
|
||||
'amount': amount,
|
||||
'price':price,
|
||||
'planname': planname,
|
||||
'recurring': recurring,
|
||||
'end_of_billing_period': end_of_billing_period,
|
||||
}
|
||||
|
||||
res = send_template_email(from_email,[useremail],
|
||||
subject,
|
||||
'subscription_update_email.html',
|
||||
d, **kwargs)
|
||||
|
||||
return 1
|
||||
|
||||
@app.task
|
||||
def handle_send_email_subscription_create(
|
||||
username, useremail, planname, recurring, price, amount,
|
||||
end_of_billing_period, **kwargs):
|
||||
|
||||
if 'debug' in kwargs:
|
||||
debug = kwargs['debug']
|
||||
else:
|
||||
debug = True
|
||||
|
||||
subject = "Rowsandall Payment Confirmation"
|
||||
|
||||
from_email = 'Rowsandall <admin@rowsandall.com>'
|
||||
|
||||
d = {
|
||||
'name': username,
|
||||
'siteurl': siteurl,
|
||||
'amount': amount,
|
||||
'price':price,
|
||||
'planname': planname,
|
||||
'end_of_billing_period': end_of_billing_period,
|
||||
'recurring': recurring,
|
||||
}
|
||||
|
||||
res = send_template_email(from_email,[useremail],
|
||||
subject,
|
||||
'subscription_create_email.html',
|
||||
d, **kwargs)
|
||||
|
||||
return 1
|
||||
|
||||
@app.task
|
||||
def handle_sendemail_raceregistration(
|
||||
|
||||
Reference in New Issue
Block a user