#meger-reactnative-googlepay
1 messages · Page 1 of 1 (latest)
@vapid shard let's chat here!
Can you share more details? Which documentation are you referencing and how are you trying to accept GooglePay payments?
I am using this doc
React native tab
I have GooglePayButton active on my emulator
On click I get back the successful alert message
With no googlepay pop up sheet
And you're calling presentGooglePay? Can you share some of your code?
Yes I did call it
I am using the exact code on the doc, the only changes is the function that get clientSecret
Which is for the intent
Also I wrap my GooglePayButton with stripe provider probably it will work
Nothing comes up only the alert message
Got it, thanks for the context. I'm not too familiar with React Native so I'm getting some help from a teammate
here are some screen shot, may be you should send it along
Hi 👋
As a place to start can you try logging the clientSecret value before you call presentGooglePay?
Please don't send screenshots, they aren't very useful to me.
If you could copy the log message and paste here that will help
SO you are getting the client secret immediately prior to calling presentGooglePay?
yes that is correct
And just so I'm clear you are able to initialize Google Pay without any error? https://stripe.com/docs/google-pay?platform=react-native#react-native-init
Wait wait wait. Where are you returning the Google Pay Button view?
This
return (
<View >
<GooglePayButton
type="standard"
onPress={pay}
style={{
width: '100%',
height: 50,
}}
/>
</View>
);
yes no error, the catch will will display the error message instead
the same page i made the call
<StripeProvider
publishableKey={key}
urlScheme="your-url-scheme" // required for 3D Secure and bank redirects
merchantIdentifier="merchant.com.{{NafoloPay}}" // required for Apple Pay
>
<GooglePayButton
type="standard"
onPress={()=> pay()}
style={{
width: '100%',
height: 50,
marginTop: 50,
justifyContent: "flex-end",
borderRadius: 25,
}}
/>
</StripeProvider>
i did this hopefully it work
i did wrap it with a provider
i also encounter some issue with the card payment, not until i watch one of your video on Youtube, before i discovered, there is a different import made from a hook. As for this i could not find any related video.
AFAIK the merchant identifier shouldn't include the curly braces { but I don't think that's the specific problem here
Can you share the Payment Intent ID so I can check that?
pi_3MbB4FHKujt7W19a1FdVac6Z_secret_NkEQ4rcVnsWdWuveTflHKmL4E here it is
Okay everything looks fine there.
i just did this
const data = await presentGooglePay({
clientSecret: paymentIntent,
forSetupIntent: false,
});
may be there is a key identifier
also the presentGoogle function is it suppose to return something?
because on click i tried consoling data, i got nothing
Can you review our example app Google Pay component here? https://github.com/stripe/stripe-react-native/blob/master/example/src/screens/GooglePayScreen.tsx
ok on it
let me take my time to check it out, i will come back if i still need help. Thank you
meger-reactnative-googlepay