Send an email automatically when a payment fails.
This commit is contained in:
parent
58dbb540a1
commit
189903ffe9
2 changed files with 41 additions and 18 deletions
|
@ -41,6 +41,22 @@ Customer email: <a href="mailto:{2}">{2}</a><br>
|
|||
Quay user or org name: {3}<br>
|
||||
"""
|
||||
|
||||
|
||||
PAYMENT_FAILED = """
|
||||
Hi {0},<br>
|
||||
<br>
|
||||
Your recent payment for Quay.io failed, which usually results in our payments processorcanceling
|
||||
your subscription automatically. If you would like to continue to use Quay.io without interruption,
|
||||
please add a new card to Quay.io and re-subscribe to your plan.<br>
|
||||
<br>
|
||||
You can find the card and subscription management features under your account settings.<br>
|
||||
<br>
|
||||
Thanks and have a great day!<br>
|
||||
<br>
|
||||
-Quay.io Support<br>
|
||||
"""
|
||||
|
||||
|
||||
SUBSCRIPTION_CHANGE_TITLE = 'Subscription Change - {0} {1}'
|
||||
|
||||
|
||||
|
@ -82,3 +98,10 @@ def send_subscription_change(change_description, customer_id, customer_email, qu
|
|||
msg.html = SUBSCRIPTION_CHANGE.format(change_description, customer_id, customer_email,
|
||||
quay_username)
|
||||
mail.send(msg)
|
||||
|
||||
|
||||
def send_payment_failed(customer_email, quay_username):
|
||||
msg = Message('Quay.io Subscription Payment Failure', sender='support@quay.io',
|
||||
recipients=[customer_email])
|
||||
msg.html = PAYMENT_FAILED.format(quay_username)
|
||||
mail.send(msg)
|
||||
|
|
Reference in a new issue