#Joška Darko-RN errors

1 messages · Page 1 of 1 (latest)

quasi jewel
#

That issue is creating a PaymentMethod directly but same underlying issue

tulip knoll
#

Nobody provided any solution actually here

quasi jewel
#

Yeah I was noticing that. Not sure if they found one. The underlying issue is something isn't being passed that needs to be.

#

Joška Darko-RN errors

#

(copying over the other message for ease of reference)


const { confirmPayment } = useConfirmPayment();

const confirm3DPayment = async (clientSecret) => {
    try {
      const billingDetails = {
        email: 'email@stripe.com',
        phone: '+48888000888',
        addressCity: 'Houston',
        addressCountry: 'US',
        addressLine1: '1459 Circle Drive',
        addressLine2: 'Texas',
        addressPostalCode: '77063',
      };
      const res = await confirmPayment(clientSecret, {
        type: 'Card',
        billingDetails,
        setupFutureUsage: 'OffSession',
      });
      console.log("res: ", res);
      // Here I get this to the console: 
      // res: {
      //  "stripeErrorCode": null,
      //  "declineCode": null,
      //  "localizedMessage": "Card details not complete",
      //  "message": "Card details not complete",
      //  "type": null,
      //  "code": "Failed"
      // }

    } catch (error) {
      console.error(error)
    }
  };```
tulip knoll
#

Yes but in documentation the only thing you have to pass are these:

        type: 'Card',
        billingDetails,
        setupFutureUsage: 'OffSession',
      });```
#

Only the clientSecret and type: 'Card' inside options are mandatory here as I am concerned.

#

I followed their official examples

quasi jewel
#

In your original message there's Source = source -- where in your code is that being used? Do you get anything if you log out source?

tulip knoll
#

I do not have source as I save card first and then I pay afterwards

#

We use that flow for paying but it only not works with 3D secure cards (we implementing 3D secure right now)

quasi jewel
#

What's the id of one of the PaymentIntents you see this error with?

tulip knoll
#

paymentIntentId: "pi_3Jag1nGFakJ8ZXMm1qUglpTR"

tulip knoll
#

This is our method on the backend I suppose

quasi jewel
#

Oh I think I see the issue.

#

handleCardAction(clientSecret) should do it

tulip knoll
#

let me try that right now, thanks though 🙂

#

That's actually it 🙂

#

you saved my day man! Thank you very much! 🙂

quasi jewel
#

Appreciated but no tipping necessary 🙂

tulip knoll
#

Yes but you saved me a lot of time to find this out, anyway thank you once more and have a nice day/weekend 🙂