#Revathi
1 messages · Page 1 of 1 (latest)
You don't 'fix' that. That redirect is a part of the 3DS authentication flow for payments
In the real world scenario, your customers will likely need to authenticate payments as requested by their bank. That flow facilitates that
But in all youtube channel samples, that redirects not happening. I don't want to show that hoooks.stripe.com in testing account as well. so is there any way to restrict this. please help on this part
Which test cards are you using and how are you integrating?
I am using test card 4242 4242 4242 4242 06/23 121. I am integrating using the below code const initSheet = await stripe.initPaymentSheet({
paymentIntentClientSecret: clientSecret,
customerEphemeralKeySecret: response.ephemeralKey,
merchantDisplayName: "Revathi N",
customerId: response.customer,
allowsDelayedPaymentMethods: true,
defaultBillingDetails: {
name: "Jane Doe",
},
});
console.log("--initsheet---", initSheet);
if (initSheet.error) return Alert.alert(initSheet.error.message);
const presentSheet = await stripe.presentPaymentSheet();
console.log("--presentSheet---", presentSheet);
By that I mean which React Native UIs and functions are you using
I am using stripe . const { initPaymentSheet, presentPaymentSheet } = useStripe(); const stripe = useStripe();
Perhaps you could try passing the returnURL param: https://stripe.dev/stripe-react-native/api-reference/modules/PaymentSheet.html#SetupParams
Documentation for @stripe/stripe-react-native
I already tried using www.google.com as returnURL in initPaymentSheet method. that also didnt work
Yeah, then it can't really be prevented I'm afraid. It's just how it works
then whats the purpose of using returnURL...
Explained here: https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=payment-sheet#react-native-set-up-return-url
Based on document, returnURL is set only for iOS device. But I am using Android.
I'm not sure what you want me to say. It's not possible to bypass the hook.stripe.com redirect
So, In real transaction it wont appear. only for testing purpose it will display. Am I right?
As explained here, yours customers will likely be asked to authenticate their payments and that is what this redirect facilitates. In the real world, it'll be a UI from their bank asking them to confirm the payment
Okay. Thanks! Is there possibilities to use googlepay and phonepe using stripe?
Google Pay, yes. Not sure what 'phonepe' is