summaryrefslogtreecommitdiff
path: root/postgresqleu/stripepayment
diff options
context:
space:
mode:
authorMagnus Hagander2024-02-09 11:10:26 +0000
committerMagnus Hagander2024-02-09 11:12:46 +0000
commit5e8f0c61cd1665a71a49f3746a9f55a6d8037386 (patch)
tree9813c307e55579df07f9e38ac4cc3e924f91cbf6 /postgresqleu/stripepayment
parent8d0445c36bbde68d9951b864e82f1948ed3b836f (diff)
Include information about amount in stripe payout notifications
Diffstat (limited to 'postgresqleu/stripepayment')
-rw-r--r--postgresqleu/stripepayment/views.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/postgresqleu/stripepayment/views.py b/postgresqleu/stripepayment/views.py
index 05edde1e..75b6327d 100644
--- a/postgresqleu/stripepayment/views.py
+++ b/postgresqleu/stripepayment/views.py
@@ -15,6 +15,7 @@ from postgresqleu.invoices.util import InvoiceManager
from postgresqleu.invoices.util import is_managed_bank_account
from postgresqleu.invoices.util import register_pending_bank_matcher
from postgresqleu.util.decorators import global_login_exempt
+from postgresqleu.util.currency import format_currency
from postgresqleu.accounting.util import create_accounting_entry
from postgresqleu.mailqueue.util import send_simple_mail
@@ -246,13 +247,18 @@ def webhook(request, methodid):
r'.*STRIPE(\s+[^\s+].*|$)',
payout.amount,
entry)
- msg = "A Stripe payout with description {} completed for {}.\n\nAccounting entry {} was created and will automatically be closed once the payout has arrived.".format(
+ msg = "A Stripe payout of {} with description {} completed for {}.\n\nAccounting entry {} was created and will automatically be closed once the payout has arrived.".format(
+ format_currency(payout.amount),
payout.description,
method.internaldescription,
entry,
)
else:
- msg = "A Stripe payout with description {} completed for {}.\n".format(payout.description, method.internaldescription)
+ msg = "A Stripe payout of {} with description {} completed for {}.\n".format(
+ format_currency(payout.amount),
+ payout.description,
+ method.internaldescription,
+ )
StripeLog(message=msg, paymentmethod=method).save()
send_simple_mail(settings.INVOICE_SENDER_EMAIL,