diff options
| author | Adam Soltys <[email protected]> | 2023-12-06 22:56:43 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-12-06 22:56:46 -0800 |
| commit | f2878d2e9879109a83dc63562d05126489d36cdc (patch) | |
| tree | c399ed949ce1e7917667659987dd42354d2a3f7f /lib | |
| parent | 19b906ec847dbb1f07eeb2d74abd52d195cf6f3e (diff) | |
| download | coinos-server-f2878d2e9879109a83dc63562d05126489d36cdc.tar.gz coinos-server-f2878d2e9879109a83dc63562d05126489d36cdc.zip | |
payment notifications
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/payments.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/payments.js b/lib/payments.js index 2d0b3330..6ec76650 100644 --- a/lib/payments.js +++ b/lib/payments.js @@ -183,7 +183,15 @@ export let credit = async (hash, amount, memo, ref, type = types.internal) => { callWebhook(invoice, p); if (user.verified) { - mail(user, "Payment received", templates.paymentReceived, p); + mail(user, "Payment received", templates.paymentReceived, { + username, + sats: + "⚡️" + + new Intl.NumberFormat("en-US", { maximumFractionDigits: 0 }).format( + p.amount + ), + link: `${process.env.URL}/payment/${p.id}` + }); } mqtt1.publish( |
