Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Rough in charge notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Mar 30, 2015
1 parent 20faaef commit 6e7d018
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions emails/notify_charged.spt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{{ _("Your payment(s) succeeded!", user_name, platform) }}

[---] text/html
{{ _("We charged your credit card {{ format_currency(amount) }} today, to fund your payments to <a href="/giving/">{{ top_supported }}{% if %}and {{ nsupported - 1 }} others{% endif %}</a>. Thanks for using Gratipay!",
format_currency(amount, 'USD'),
('<b><a href="{0}">{1}</a></b>'|safe).format(profile_url, user_name)) }}
[---] text/plain

1 change: 1 addition & 0 deletions gratipay/billing/payday.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ def settle_card_holds(self, cursor, holds):
def capture(p):
amount = -p.new_balance
capture_card_hold(self.db, p, amount, holds.pop(p.id))
p.queue_email('notify_charged', **locals())
threaded_map(capture, participants)
log("Captured %i card holds." % len(participants))

Expand Down

0 comments on commit 6e7d018

Please sign in to comment.