From 966a5f30ec3466c5afbdbae71479e1bb6983c276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Omar=20L=C3=B3pez?= Date: Sat, 2 Apr 2022 07:30:07 -0700 Subject: [PATCH] Adds missing confirm email after payment (#2353) --- apps/web/ee/pages/api/integrations/stripepayment/webhook.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/web/ee/pages/api/integrations/stripepayment/webhook.ts b/apps/web/ee/pages/api/integrations/stripepayment/webhook.ts index fbd2fc78..2124797f 100644 --- a/apps/web/ee/pages/api/integrations/stripepayment/webhook.ts +++ b/apps/web/ee/pages/api/integrations/stripepayment/webhook.ts @@ -10,6 +10,7 @@ import { CalendarEvent } from "@calcom/types/Calendar"; import { IS_PRODUCTION } from "@lib/config/constants"; import { HttpError as HttpCode } from "@lib/core/http/error"; +import { sendScheduledEmails } from "@lib/emails/email-manager"; import { getTranslation } from "@server/lib/i18n"; @@ -126,6 +127,8 @@ async function handlePaymentSuccess(event: Stripe.Event) { }); } + await sendScheduledEmails({ ...evt }); + throw new HttpCode({ statusCode: 200, message: `Booking with id '${booking.id}' was paid and confirmed.`,