Skip to content

Commit

Permalink
feat: Add ACH to stripe email template
Browse files Browse the repository at this point in the history
  • Loading branch information
suejung-sentry committed Jan 21, 2025
1 parent 9f89174 commit b569e50
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion billing/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,15 @@ def invoice_payment_failed(self, invoice: stripe.Invoice) -> None:
)
template_vars = {
"amount": invoice.total / 100,
"card_type": card.brand if card else None,
"last_four": card.last4 if card else None,
"cta_link": invoice.hosted_invoice_url,
"date": datetime.now().strftime("%B %-d, %Y"),
# card params
"is_credit_card": True if card else False,
"card_type": card.brand if card else None,
# us bank params
"is_us_bank": True if payment_intent.payment_method and hasattr(payment_intent.payment_method, 'us_bank_account') else False,
"bank_name": payment_intent.payment_method.us_bank_account.bank_name if payment_intent.payment_method and hasattr(payment_intent.payment_method, 'us_bank_account') else None,
}

for admin in admins:
Expand Down

0 comments on commit b569e50

Please sign in to comment.