#hendrid

1 messages ยท Page 1 of 1 (latest)

tropic escarpBOT
grim pollen
#

Hello ๐Ÿ‘‹
Can you share the example PaymentIntent ID where you're seeing this error?
Also screenshots of the modal would help understand the flow

elfin jay
#

The second intent with this card 4000002760003184 Always authenticate don't show the modal

grim pollen
#

Can you share the PaymentIntent ID?

elfin jay
#

pi_3N6CdoC4rroAcPLI1KboMn4U failed

#

pi_3N6CeNC4rroAcPLI1MDaFUye Incomplete

grim pollen
#

I don't see a confirmation request coming in to confirm/handle the next action on the PaymentIntent (for the one that's incomplete)
Can you check your logs to see if there's an error when you attempt to confirm the PaymentIntent client-side?

elfin jay
#

This is the problem, the modal don't show in the second payment intent

grim pollen
#

The modal won't show until you attempt to confirm the PaymentIntent
I suspect your confirmation call is failing prior to reaching Stripe Servers

#

Have you looked into your logs to see if there are any errors?

elfin jay
#

I have to refresh the page and try again to see the modal

#

No error @grim pollen

grim pollen
#

Not in the network tab, check the console tab

elfin jay
#

This one?

grim pollen
#

No, that seems like just a warning.

elfin jay
grim pollen
#

Can you share the code that you're running for confirming the PaymentIntent?

elfin jay
#

the modal

  client_secret,
  stripe,
  returnUrl,
  setError3DS,
}) => {
  useEffect(() => {
    stripe
      .confirmPayment({
        clientSecret: client_secret,
        confirmParams: {
          return_url: returnUrl,
        },
      })
      .then((result) => {
        if (result.error) {
          setError3DS(result.error.decline_code);
        }
      });
  }, []);
  return <></>;
};
grim pollen
#

Can you check if your confirmPayment function is running after the client-secret is swapped?

#

You'd likely want to change useEffect dependency array to include client_secret so that useEffect runs everytime client-secret changes

elfin jay
#

cool, I make the change and test

#

Thx dude, you make my day ๐Ÿ™ ๐Ÿซถ