Add support for custom billing invoice email address

Fixes #782
This commit is contained in:
Joseph Schorr 2015-12-28 13:59:50 -05:00
parent 16f16e8a15
commit 10efa96009
12 changed files with 94 additions and 23 deletions

View file

@ -37,7 +37,7 @@ def stripe_webhook():
invoice = stripe.Invoice.retrieve(invoice_id)
if invoice:
invoice_html = renderInvoiceToHtml(invoice, user)
send_invoice_email(user.email, invoice_html)
send_invoice_email(user.invoice_email_address or user.email, invoice_html)
elif event_type.startswith('customer.subscription.'):
cust_email = user.email if user is not None else 'unknown@domain.com'