#Alexey.Drabushev-confirm-pi-3ds

1 messages · Page 1 of 1 (latest)

wraith vector
#

Hey, what does sendServerReq actually do? Can you share a pi_xxx ID?

rigid lantern
wraith vector
#

Which request?

#

Also, seems like the function invokes itself? Like you call sendServerReq inside the function statement for sendServerReq.

#

It's hard to read your code as its not formatted/syntax hioghlighted

#

If you share the Payment Intent ID I can figure out what's going on

rigid lantern
#

pi_3LY6SfIT1dMTOpzV1IKpgklV

for example

wraith vector
#

I think your sendServerReq is being invoked a 2nd time

#

Why is it invoking itself? I don't understand

rigid lantern
#

It sends purchase request to the backend 2nd time with Payment Intent ID. and backend complete the purchase (response without secret and goes to onSuccess)

wraith vector
#

I suspect that's your issue, it's likely invoking confirmCardPayment a 2nd time

rigid lantern
#

I got the same issue also without sendServerReq recursive call

wraith vector
#

Can you show me the code that initially calls sendServerReq

rigid lantern
#

on "Confirm payment" button click:

    try {
        const stripeNonce = await sendStripeReq(stripe, card, name);
        await sendServerReq();
    } finally {
        setCheckoutLoader({show: false});
    }
}```



```const sendStripeReq = async (stripe, card, name) => {
    try {
        const res = await stripe.createPaymentMethod(
            {
                type: 'card',
                card,
                billing_details: {
                    name: name,
                },
            }
        );
        return res.paymentMethod.id;
    } catch (e) {
        return e
    }
};
wraith vector
#

Is there somewhere I can replicate this?

#

I cannot replicate this (the 3DS modal does not close automatically), it only triggers a similar behaviour if I click the cancel button above the modal

rigid lantern
wraith vector
#

Works fine for me

#

In a non-incognito window

#

My guess is you have some extension that's blocking the JS

rigid lantern
#

hmmm. I'll check it. Thank you for your time!

wraith vector
#

np!