airwallex / airwallex-payment-demo

Airwallex payment element integration demo
39 stars 24 forks source link

Failed to chage the return_url when using Split Card payment elements #92

Open emiltsang opened 1 year ago

emiltsang commented 1 year ago

Describe the bug I have started to integrate the Split Card from airwallex-payment-elements, but failed to change the _returnurl when 3DS is triggered.

I am testing with https://api-demo.airwallex.com.

To Reproduce

  1. Create the payment intent with https://api-demo.airwallex.com/api/v1/pa/payment_intents/create
    {
    "amount": 10,
    "currency": "HKD",
    "merchant_order_id": "TEST-ID",
    "request_id": "REQUEST_ID",
    "payment_method_options": {
        "card": {
            "three_ds_action": "FORCE_3DS"
        }
    },
    "return_url": "http://www.example.com"
    }
  2. Enter the Card Number, Expiry Date, CVC to the split card element
  3. Confirm the payment intent with
    await confirmPaymentIntent({
                    element: cardNumElement,
                    id: "INTENT_ID",
                    client_secret: "CLIENT_SECRET",
                    payment_method_options: {
                        card: {
                            auto_capture: true,
                            three_ds: {
                                return_url: 'http://www.example.com'
                            }
                        },
                    }
                })
  4. User is not redirected to http://www.example.com after confirming the payment intent

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Integration information:

shirly-chen-awx commented 1 year ago

hey, @emiltsang can you provide your intentId?