#Jedburgh-CardField
1 messages · Page 1 of 1 (latest)
sure
dispatch(GlobalAction.createIntent({api_token: userToken}))
.then(async (responseData) => {
const {setupIntent, error} = await confirmSetupIntent(responseData.client_secret, {
type: 'Card',
billingDetails
});
if (error) {
console.log(error)
} else {
console.log({"success": setupIntent})
}
})
}
sorry can't get snippit to work
How do you initialize the Stripe SDK? do you use <StripeProvider> anywhere in your code?
yes
I had it working earlier today by doing the // Init Stripe in the useEffect that's commented out
but doesn't seem to be doing it anymore
sorry code is pretty messy
OK, I'd recommend you to wrap the CardField inside the <StripeProvider> so that confirmSetupIntent knows where to get the card details
Oh do you have one? because I don't see StripeProvider in your code/
yes it's wrapping the root component
OK, you just need one StripeProvider that wraps all Stripe Components in your code
yeah no dice. this was talked about here I think https://github.com/stripe/stripe-react-native/issues/508