From 2dfbcad4bd3124baf3b9faeefe96bbd69f2a4931 Mon Sep 17 00:00:00 2001 From: Alexander Alemayhu Date: Fri, 28 Jun 2024 00:04:13 +0200 Subject: [PATCH] chore: add more logging --- src/controllers/StripeController/StripeController.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/controllers/StripeController/StripeController.ts b/src/controllers/StripeController/StripeController.ts index 3a731dcf..739ffb0b 100644 --- a/src/controllers/StripeController/StripeController.ts +++ b/src/controllers/StripeController/StripeController.ts @@ -31,11 +31,14 @@ export class StripeController { const loggedInUser = await authService.getUserFrom(token); const sessionId = req.query.session_id as string; + console.log('loggedInUser', loggedInUser); + console.log('sessionId', sessionId); if (loggedInUser && sessionId) { const stripe = getStripe(); const session = await stripe.checkout.sessions.retrieve(sessionId); const email = session.customer_email; + console.log('cmp', loggedInUser.email, ' ', email); if (loggedInUser.email !== email && email) { await usersService.updateSubScriptionEmailUsingPrimaryEmail( email.toLowerCase(),