#tarantino-47_react-native-google-pay
1 messages Β· Page 1 of 1 (latest)
π Welcome to your new thread!
β²οΈ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
β±οΈ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
π This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1357353908095160504
π Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- tarantino-47_google-pay-testing, 6 days ago, 15 messages
just an fyi, I have real credit card attached to my google pay
also, i did follow this
https://docs.stripe.com/google-pay?platform=react-native#react-native-create-enable-google-pay
Have you reviewed this? https://docs.stripe.com/testing/wallets
Does google pay appearing for you there?
What element are you using and can you share your stripe.js / elements initialization code?
I'm using react native sdk. Payment Sheet
https://docs.stripe.com/payments/accept-a-payment?platform=react-native&ui=payment-sheet
π stepping in as synthrider needs to step away
If you visit https://docs.stripe.com/elements/express-checkout-element/accept-a-payment on the device you are testing on does the Google Pay button show up there?
this code return True
https://docs.stripe.com/google-pay?platform=react-native#react-native-init
I do see Gpay there
and everything works if i pass testEnv: false to the initPaymentSheet
Are you using Expo here?
no
Hmm okay. Can you show me your AndroidManifest.xml and how you are calling initPaymentSheet()?
im using setup intent:
"livemode": false,
"payment_method_options": {
"card": {
"mandate_options": null,
"network": null,
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"single_use_mandate": null,
"status": "requires_payment_method",
"usage": "off_session"
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> <application
<meta-data
android:name="com.google.android.gms.wallet.api.enabled"
android:value="true" />
</application>
</manifest>
const { error } = await initPaymentSheet({
merchantDisplayName: 'my name',
allowsDelayedPaymentMethods: true,
returnURL: 'test://stripe-redirect',
customFlow: false,
setupIntentClientSecret,
googlePay: {
merchantCountryCode: 'US',
currencyCode: 'USD',
label: 'test label',
amount: '0',
testEnv: true,
},
});
Can you provide me a SetupIntent ID that you tested with?
sure, seti_1R9ogMFbFOzNrsPE5Qu2HExq
google pay is enabled on test and prod env in my stripe dashbard.
Still looking... not seeing anything that indicates it should not be working yet.
Can you try removing everything withing your googlePay hash except for:
merchantCountryCode: 'US',
testEnv: true,
I also use a different component in my app which is working fine for both env.
import { PlatformPayButton } from '@stripe/stripe-react-native';
Okay test the above for me and let me know if that causes it to show up in PaymentSheet
same, still can't see gpay on test env with this config:
merchantCountryCode: 'US',
testEnv: true,
π€
do you have any other possible solutions?
What version of the SDK are you using?
it's weird that it's showing up for prod, but not for test
not the latest one
"@stripe/stripe-react-native": "^0.38.6",
You can see it in PaymentSheet in prod but not test?
Or you just see it with PlatformPay?
You can see it in PaymentSheet in prod but not test?
correct
Are you testing on a simulator or real device?
it works if i set testEnv to false
simulator. but i have the exact same results on a real device
Can you print the client secret client-side just to ensure you aren't mixing up accounts here or something?
i did, the one I shared with you was from my test back end config, all should be good
That was the SetupIntent though, right? Did you grab that from your server?
Is it possible you have a different route for test mode and you are actually hitting a different account where Google Pay is disabled in the test mode settings?
Really if it is working in prod but not test then the only real thing can be your account settings...
let me check again
ping message to keep the thread opened
so in my stripe account I have gpay enabled for both test and prod
and when I use testEnv: true and log the clientSecret - I can't find it in prod stripe dashboard and vice versa
Can you provide me the client secret that you logged out?
this is for test
seti_1R9p8DFbFOzNrsPEScsqkMAE_secret_S3x2YECjW1eJ4vBr3YGl9DVauPMVxmX
for prod I need to rebuild the app, one sec
Prod one
seti_1R9prQFbFOzNrsPETTMihYWb_secret_S3xny5pW2RwAcxpFgwQZDNKVndBYQ90
so it doesn't matter if I use Prod stripe API on the BE for creating intent/client secret or Test stripe API -I still can't see GPay if testEnv is set to true
Yeah those are same account and have the same settings. So I'm really stumped for why this wouldn't show in test mode...
screen is exactly the same, I'm just changing testEnv param which I pass to initPaymentSheet
Hmm I am seeing Expo here in the user agent...
You indicated above you weren't using Expo?
There is a limitation for Expo Go: https://docs.expo.dev/versions/latest/sdk/stripe/#google-pay
The logs also indicate that Google Pay is available here for that SetupIntent in test mode.
So it indeed is not an account config issue or anything else.
It is clearly some sort of client-side issue.
Can you confirm you aren't using Expo Go here?
well, I have expo packages installed in my app
but I have
import { AppRegistry } from 'react-native'; in my index file.
and i have android/ and ios/ directories
Hi π
I'm stepping in as my colleague needs to go
We still see the following in the User Agent header: @stripe/stripe-react-native/expo/0.38.6
I am reviewing the logs for the request made by your Payment Sheet to determine what payment methods to show: https://dashboard.stripe.com/test/logs/req_ACqqsBL66ZX0BE
hm, this is a bare React Native project with some Expo modules included, not a full Expo project
I see the following: ordered_payment_method_types=["card","apple_pay","google_pay"] so we do think Google Pay is valid and communicate as much.
can't see the logs from the URL you shared. neither in prod nor in test env.
No request log found with the specified ID.
ok, so you think something wrong on the client side?
That's what these logs indicate to me. We are sending the data back to the Payment Sheet that says Google Pay is a valid payment method. So, at that point, it would be the client-side configuration that prevents Google Pay from being displayed.
The fact that this works on Prod would indicate that as well.
It looks like this has been a problem before as our package maintainers specified here
Have you tried this advice?
run expo run:android in your project directory.
no, I haven't, let me try, but I'm not really using an expo
do you think it's safe to leave it as is?
I mean to release the app, but keep in mind that gpay doesn't work in testEnv
since in prod it works fine
IDK that would be up to you. Personally I would want to test end-to-end to validate behavior. But I realize some frameworks make that more difficult
What I think is rather confusing here is how Expo relates. I will be honest, I have no experience with Expo projects, ejected or otherwise. As I said, we do see it in the User Agent headers which suggests to me that, at some level, the client-side code is basing it's behavior on Expo.
ok, thank you
is it possible to send to stripe support a demo app with this issue? so that somebody helps to resolve this issue
Definitely. I can send you a link so that your case gets accelerated routing to our team. We would want just a minimum reproduction that renders the Payment Sheet so we can wire it up to our test APIs and see if we can reproduce the error.
Hello @final musk, we have sent you a direct message, please check it at https://discord.com/channels/@me/1357399963889307770
- πThe message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
thank you