Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter dewdrop99

    (@dewdrop99)

    Hello,

    Yes, I was able to reproduce it and capture the JavaScript stack.

    The error is triggered here:

    const { payment_method } = result.paymentIntent;
    
    if (['promptpay', 'swish', 'paynow', 'cashapp'].includes(payment_method.type)) {

    The problem is that, after cancelling the MB WAY payment in the app, the returned PaymentIntent has:

    "status": "requires_payment_method",
    "payment_method": null

    while the response still includes the failed payment method under:

    "last_payment_error.payment_method.type": "mb_way"

    So the frontend tries to read payment_method.type even though payment_method is null, which causes:

    Cannot read properties of null (reading 'type')

    This appears to be a null-handling issue in the plugin/frontend when a customer cancels an MB WAY payment via UPM.

    I am attaching the debugger screenshot and the relevant PaymentIntent payload.

Viewing 1 replies (of 1 total)