#tarantino-47_react-native-google-pay

1 messages Β· Page 1 of 1 (latest)

clear sedgeBOT
#

πŸ‘‹ 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.

final musk
#

just an fyi, I have real credit card attached to my google pay

crisp girder
#

Does google pay appearing for you there?

#

What element are you using and can you share your stripe.js / elements initialization code?

clear sedgeBOT
final musk
cedar radish
#

πŸ‘‹ stepping in as synthrider needs to step away

final musk
#

I do see Gpay there

#

and everything works if i pass testEnv: false to the initPaymentSheet

cedar radish
#

Are you using Expo here?

final musk
#

no

cedar radish
#

Hmm okay. Can you show me your AndroidManifest.xml and how you are calling initPaymentSheet()?

final musk
#

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"

#

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,
},
});

cedar radish
#

Can you provide me a SetupIntent ID that you tested with?

final musk
#

sure, seti_1R9ogMFbFOzNrsPE5Qu2HExq

#

google pay is enabled on test and prod env in my stripe dashbard.

cedar radish
#

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, 
final musk
#

I also use a different component in my app which is working fine for both env.
import { PlatformPayButton } from '@stripe/stripe-react-native';

cedar radish
#

Okay test the above for me and let me know if that causes it to show up in PaymentSheet

final musk
#

same, still can't see gpay on test env with this config:
merchantCountryCode: 'US',
testEnv: true,

cedar radish
#

πŸ€”

final musk
#

do you have any other possible solutions?

cedar radish
#

What version of the SDK are you using?

final musk
#

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",

cedar radish
#

You can see it in PaymentSheet in prod but not test?

#

Or you just see it with PlatformPay?

final musk
#

You can see it in PaymentSheet in prod but not test?
correct

cedar radish
#

Are you testing on a simulator or real device?

final musk
#

it works if i set testEnv to false

#

simulator. but i have the exact same results on a real device

cedar radish
#

Can you print the client secret client-side just to ensure you aren't mixing up accounts here or something?

final musk
#

i did, the one I shared with you was from my test back end config, all should be good

cedar radish
#

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...

final musk
#

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

cedar radish
#

Can you provide me the client secret that you logged out?

final musk
#

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

cedar radish
#

Yeah those are same account and have the same settings. So I'm really stumped for why this wouldn't show in test mode...

final musk
#

me too lol

#

isPlatformPaySupported is always true, which means it should be rendered

cedar radish
#

You have both components on the same screen?

#

And is it exactly the same in prod?

clear sedgeBOT
final musk
#

screen is exactly the same, I'm just changing testEnv param which I pass to initPaymentSheet

cedar radish
#

Hmm I am seeing Expo here in the user agent...

#

You indicated above you weren't using Expo?

#

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?

final musk
#

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

rose citrus
#

Hi πŸ‘‹

I'm stepping in as my colleague needs to go

final musk
#

hello

#

I believe this is ejected Expo project

#

in other words not an expo project

rose citrus
#

We still see the following in the User Agent header: @stripe/stripe-react-native/expo/0.38.6

final musk
#

hm, this is a bare React Native project with some Expo modules included, not a full Expo project

rose citrus
#

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.

final musk
#

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?

rose citrus
#

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.

final musk
#

I see

#

do you have any ideas/further directions for me?

rose citrus
#

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.

final musk
#

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

rose citrus
#

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.

final musk
#

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

rose citrus
#

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.

clear sedgeBOT
#

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.
final musk
#

thank you