Fix/stripe payment intent succeded (#3044)

* Remove conditional that turned off booking payment update

* Added stripe webhook key to env vars

* Update .env.example

Co-authored-by: Omar López <[email protected]>
This commit is contained in:
alannncandOmar López authored and GitHub committed 2022-06-13 13:41:57 -06:00
1 parent f9d05f7a0e
commit 2362133b25
2 files changed
+1 -4

No files matched your search

@@ -187,10 +187,6 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
const event = stripe.webhooks.constructEvent(payload, sig, process.env.STRIPE_WEBHOOK_SECRET);
if (event.account) {
throw new HttpCode({ statusCode: 202, message: "Incoming connected account" });
}
const handler = webhookHandlers[event.type];
if (handler) {
await handler(event);