fix email

This commit is contained in:
Emily
2024-09-13 19:02:15 +02:00
parent e7c2dbf237
commit c253846b86
2 changed files with 8 additions and 5 deletions

View File

@@ -94,7 +94,7 @@ async function onPaymentOnetimeSuccess(event: Event.PaymentIntentSucceededEvent)
if (!user) return { ok: false, error: 'USER NOT EXIST FOR PROJECT' + project.id }
setTimeout(() => {
EmailService.sendPurchaseEmail(user.email);
EmailService.sendPurchaseEmail(user.email, project.name);
}, 1);
return { ok: true };
@@ -139,9 +139,10 @@ async function onPaymentSuccess(event: Event.InvoicePaidEvent) {
if (!user) return { ok: false, error: 'USER NOT EXIST FOR PROJECT' + project.id }
setTimeout(() => {
EmailService.sendPurchaseEmail(user.email);
if (PLAN.ID == 0) return;
EmailService.sendPurchaseEmail(user.email, project.name);
}, 1);
return { ok: true };