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_'
This commit is contained in:
parent
41c89f0cd8
commit
4c6d4b35b4
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ export async function POST(req: Request) {
|
||||||
data = event.data.object as Stripe.Checkout.Session
|
data = event.data.object as Stripe.Checkout.Session
|
||||||
console.log(`💰 CheckoutSession status: ${data.payment_status}`)
|
console.log(`💰 CheckoutSession status: ${data.payment_status}`)
|
||||||
break
|
break
|
||||||
case 'payment_intent.failed':
|
case 'payment_intent.payment_failed':
|
||||||
data = event.data.object as Stripe.PaymentIntent
|
data = event.data.object as Stripe.PaymentIntent
|
||||||
console.log(`❌ Payment failed: ${data.last_payment_error?.message}`)
|
console.log(`❌ Payment failed: ${data.last_payment_error?.message}`)
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue