#vis - React Native
1 messages · Page 1 of 1 (latest)
Thank you, checking that out
Ok
Still trying to figure this out, I am not familiar enough with RN and will reach out to a colleague. When specifically do you get that error from the card form? Do you make a certain call?
const handlePayPress = async () => {
// 1. fetch Intent Client Secret from backend
const clientSecret = await fetchPaymentIntentClientSecret();
// 2. Gather customer billing information (ex. email)
const billingDetails: PaymentMethodCreateParams.BillingDetails = {
email: 'email@stripe.com',
phone: '+48888000888',
addressCity: 'Houston',
addressCountry: 'US',
addressLine1: '1459 Circle Drive',
addressLine2: 'Texas',
addressPostalCode: '77063',
}; // mocked data for tests
// 3. Confirm payment with card details
// The rest will be done automatically using webhooks
const { error, paymentIntent } = await confirmPayment(clientSecret, {
type: 'Card',
billingDetails,
setupFutureUsage: saveCard ? 'OffSession' : undefined,
});
if (error) {
Alert.alert(`Error code: ${error.code}`, error.message);
console.log('Payment confirmation error', error.message);
} else if (paymentIntent) {
Alert.alert(
'Success',
`The payment was confirmed successfully! currency: ${paymentIntent.currency}`
);
console.log('Success from promise', paymentIntent);
}
};
On this call
This is there in that example
Gotcha. And this would be on step 2 correct?
Not at the moment, still looking. Thank you for clarifying
Ok
Could u pls share to your colleague who has exp in react native if not figured out?
Yes, just about to reach out.
In the meantime I did find this thread on this issue with workarounds https://github.com/stripe/stripe-react-native/issues/508#issuecomment-912105565
My colleagues have said it will be best for us to look at this through a ticket. I see you opened one for us, we will grab it and look further through there