i am working with Expo project using stripe react native , its work fine in local, publish but not working as expected in standalone app,
here i use stripe for payment and when i enter card info its returns erorr 400
400 Error
POST /v1/payment_intents/pi_3JSeHwSJwGztdZyL1BuqSJQq/confirm
"return_url": "myappname:///--/://safepay",
url_invalid - return_url Not a valid URL
here is my code :
<StripeProvider
publishableKey="xyz"
urlScheme={Linking.createURL('') + '/--/'}
setUrlSchemeOnAndroid = {true}
.............................../>
const handleDeepLink = useCallback(
async (url: string | null) => {
if (url && url.includes('safepay')) {
await handleURLCallback(url);
console.log('url',url)
navigation.navigate('Checkout', { url });
}
},
[navigation, handleURLCallback]
);
useEffect(() => {
const getUrlAsync = async () => {
const initialUrl = await Linking.getInitialURL();
handleDeepLink(initialUrl);
console.log('initialUrl',initialUrl)
};
const urlCallback = (event: { url: string }) => {
handleDeepLink(event.url);
};
getUrlAsync();
Linking.addEventListener('url', urlCallback);
return () => Linking.removeEventListener('url', urlCallback);
}, [handleDeepLink]);
how to achive deep link and how to resole this ?
Using: Standalone app, Expo 42, stripe-react-native :0.1.4