Skip to content

Commit aaeecda

Browse files
committed
add stripe email to notification
1 parent b4cbbd8 commit aaeecda

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

services/StripeService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Stripe from 'stripe'
22
import { ApiError } from '../middleware/errorHandler.js'
3-
import { getProductConfig, type ProductConfig } from '../config/products.js'
3+
import { type ProductConfig } from '../config/products.js'
44

55
let stripeClient: Stripe | null = null
66

services/WebhookService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const handleCheckoutSessionCompleted = async (session: Stripe.Checkout.Session):
8181
type: 'checkout_completed',
8282
user: {
8383
id: userId,
84-
email: 'N/A' // Email not available in checkout session
84+
email: session.customer_details?.email || session.customer_email || 'N/A'
8585
},
8686
referenceId: `checkout_completed_${session.id}`,
8787
data: {

0 commit comments

Comments
 (0)