#anony_cause
1 messages · Page 1 of 1 (latest)
Hi there, can you share with me the relevant code?
So after I generate payment intent when I try to confirm the payment I am getting errors
confirmPayment(secret, {
paymentMethodtype: 'Card',
paymentMethodId: paymentId
}).then(value => {
console.log(value)
if (value.paymentIntent) {
setTimeout(() => {
NavigationService.navigate('PaymentSuccessScreen', {'success': true});
}, 3000);
} else {
console.log('error here')
showMessageToUser({
title: 'Error',
message: 'Oops, we encountered a problem, please try again.',
notificationType: NOTIFICATION_TYPE.ERROR
});
}
})
.catch(e => console.log('e', e));
Did you customer complete the card details when this method is called?
Based on the code (https://github.com/stripe/stripe-react-native/blob/43f4dba/src/types/PaymentMethod.ts#L67) you should specify the paymentMethodId via paymentMethodData, for example
confirmPayment(secret, {
paymentMethodtype: 'Card',
paymentMethodData {
paymentMethodId: paymentId
}
})
~``
Let me try this approach and get back to you