#Joška Darko-RN errors
1 messages · Page 1 of 1 (latest)
Looks like https://github.com/stripe/stripe-react-native/issues/239 which is an error message from the RN library (rather than the Stripe API)
That issue is creating a PaymentMethod directly but same underlying issue
Nobody provided any solution actually here
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)
}
};```
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
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?
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)
And we start payment on the backend and if the card requires 3D we pass that to frontend to complete the payment. This flow I saw in this article: https://blog.logrocket.com/implementing-3d-secure-in-stripe/
What's the id of one of the PaymentIntents you see this error with?
paymentIntentId: "pi_3Jag1nGFakJ8ZXMm1qUglpTR"
var source = await GetDefaultSourceForCustomer(customerId).ConfigureAwait(false);
This is our method on the backend I suppose
Oh I think I see the issue.
You're seeing requires_action which means you should be calling https://github.com/stripe/stripe-react-native/blob/c1681a0/src/functions.ts#L231 instead of confirmPayment
handleCardAction(clientSecret) should do it
let me try that right now, thanks though 🙂
That's actually it 🙂
you saved my day man! Thank you very much! 🙂
Do have https://www.buymeacoffee.com/ ? I wanna buy you a coffee 🙂
Appreciated but no tipping necessary 🙂
Yes but you saved me a lot of time to find this out, anyway thank you once more and have a nice day/weekend 🙂