aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-12-06 22:56:43 -0800
committerAdam Soltys <[email protected]>2023-12-06 22:56:46 -0800
commitf2878d2e9879109a83dc63562d05126489d36cdc (patch)
treec399ed949ce1e7917667659987dd42354d2a3f7f /lib
parent19b906ec847dbb1f07eeb2d74abd52d195cf6f3e (diff)
downloadcoinos-server-f2878d2e9879109a83dc63562d05126489d36cdc.tar.gz
coinos-server-f2878d2e9879109a83dc63562d05126489d36cdc.zip
payment notifications
Diffstat (limited to 'lib')
-rw-r--r--lib/payments.js10
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(