Skip to content

Commit

Permalink
shitty typo
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminshafii committed Nov 27, 2024
1 parent 5098a6d commit 4f4552d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/app/api/webhook/handlers/checkout-complete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const handleCheckoutComplete = createWebhookHandler(
const session = event.data.object as Stripe.Checkout.Session;
const customerData = createCustomerDataFromSession(session);
// if it's a top up we check if the user is anonymous and update their email
if (customerData.product === "top_up") {
if (session.metadata?.product_key === "top_up_5m") {
const wasAnonymous = await updateAnonymousUserEmail(
session.metadata?.userId || "",
session.customer_details?.email || ""
Expand Down

0 comments on commit 4f4552d

Please sign in to comment.