#Alexey.Drabushev-confirm-pi-3ds
1 messages · Page 1 of 1 (latest)
sendServerReq sends request to the backend, then I get response with "requires_action" status and payment_intent_secret which I use for open 3ds auth dialog
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
pi_3LY6SfIT1dMTOpzV1IKpgklV
for example
I think your sendServerReq is being invoked a 2nd time
Why is it invoking itself? I don't understand
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)
I suspect that's your issue, it's likely invoking confirmCardPayment a 2nd time
I got the same issue also without sendServerReq recursive call
Can you show me the code that initially calls sendServerReq
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
}
};
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
you can try test flow:
https://onboarding.geodzilla.info/
source_cancel method in "network"
it's kind of wierd, but in "incognito" mode everything is ok (but only for me)
Works fine for me
In a non-incognito window
My guess is you have some extension that's blocking the JS
hmmm. I'll check it. Thank you for your time!
np!