Unverified Commit 4c6d4b35 authored by Alejandro Roigé's avatar Alejandro Roigé Committed by GitHub

Type Error on Event Type payment_intent webhook (#55493)

changed` failed `for `payment_failed` on line 45

### What?
Error in line 45 on type of payment_intent

### Why?
Example provided does not work 

### How?
Added 'payment_'
parent 41c89f0c
......@@ -42,7 +42,7 @@ export async function POST(req: Request) {
data = event.data.object as Stripe.Checkout.Session
console.log(`💰 CheckoutSession status: ${data.payment_status}`)
break
case 'payment_intent.failed':
case 'payment_intent.payment_failed':
data = event.data.object as Stripe.PaymentIntent
console.log(`❌ Payment failed: ${data.last_payment_error?.message}`)
break
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment