Skip to content

Commit

Permalink
chore: add more logging (#1554)
Browse files Browse the repository at this point in the history
  • Loading branch information
aalemayhu authored Jun 27, 2024
1 parent 0d3ebef commit ff666cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/controllers/StripeController/StripeController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ export class StripeController {
if (loggedInUser && sessionId) {
const stripe = getStripe();
const session = await stripe.checkout.sessions.retrieve(sessionId);
const email = session.customer_email;
const email = session.customer_details?.email;

console.log('cmp', loggedInUser.email, ' ', email);
if (loggedInUser.email !== email && email) {
console.log('updated email for customer');
await usersService.updateSubScriptionEmailUsingPrimaryEmail(
email.toLowerCase(),
loggedInUser.email.toLowerCase()
Expand Down

0 comments on commit ff666cd

Please sign in to comment.