#srujan-react-applepay
1 messages · Page 1 of 1 (latest)
srujan-react-applepay
Hey @lavish kite. When I look at that account you only registered the domain in Test mode which will not work. It has to be done in Live mode for it to work. No way around it
So you can't test Apple Pay on an account you created in Test mode. You have to create one in Live mode first and then register the domain in Live mode, and then you can use it in Test mode
i see
So the problem is I'm testing both google and apple pay. If google pay doesn't work for a live mode account then how am I supposed to reconcile?
Google needs a test mode account to work for some reason, otherwise I get dev errors
Oh you mean the domain
sorry
You create a Custom account in Live mode, you register the domain in Live mode. You then use your Test API key to test Apple Pay.
correct
no, otherwise I'd have recommended that 🙂
The problem is, I have a test mode connect account for testing out google pay. You're saying there's no way to use this same account for apple pay?
and no I never said that at all
1/ Create account in Live mode
2/ Create Apple Pay domain in Live mode
3/ Use Test mode API keys with PaymentElement and see either Apple Pay or Google Pay depending on the browser you're using
Okay yeah but for step 3, and I've been through the hassle of this already, I can't use a live mode account to test a google payment. It gives me dev errors. I can try it out again and see but the whole reason I am using a test mode account is so that google pay will work on my testing environments
No reason it gives you dev errors as long as you use your Test API keys. But yes at worse just use 2 separate accounts, you're just testing so you can hardcode the right account id to test the right wallet
There is definitely an error, I am using test api keys. Do you know if google intended to only allow for test mode accounts to work?
Google works when using a test mode account, not a live mode account with the test key
The problem with using 2 separate accounts is how am I supposed to rerender the element with a different account based on what the customer selects? The element itself requires a stripe account id to render in the first place
It doesn't really matter, Apple Pay and Google Pay work in different browsers. So in Safari you use account A and in Chrome you use account B. There's no real problem with testing this
What about if I want to test on IOS 16+ devices using chrome? I should be able to see both google and apple pay show up correct?
¯_(ツ)_/¯
I mean you're going for an hypothetical thing. First step is to fix Apple Pay in Test mode to work
then you can focus on the extreme edge-case later
I've gotten apple pay to work with the live mode account already
Cool then you're all set!
@atomic helm is around and can help with your Google Pay question once you clearly outline the problem, your code, the exact error(s) you are seeing, the account id(s), etc.
What solution do stripe users end up coding to give the user the ability to see both google pay and apple pay with stripe usually? Surely I'm not the first one to want to do this? Before I was using payment request button element but only one of those can be rendered at a time correct? Is the payment element the best option for this?
Please focus on your real google pay question with errors. The rest doesn't really matter
you've hinted at "doesn't work" 5 times with no info, that's what we need from you and then my colleague can help you get this fixed
Original question was related to getting apple pay to work with a test mode account, which you've answered I can't do, that I need a live account. Okay, got it, I've gotten that to work already. Next question is: google pay requires a test mode account. So the best solution here is to detect the user's browser and load the correct stripe account when rendering the payment element. Okay, got it. Last question is: how are developers rendering both options to users on chrome in IOS 16+ devices in a test environment?
My understanding is you can't because those things don't work at the same time in the same context
Oh, right, they made apple pay available there didnt they
Yeah, koopahjah is correct in saying its an edge case that iphone users are using chrome, but they're out there, and my function in coding our payment solution is to provide users with as many ways to pay as possible.
But really, I think I've had my question answered. I basically need to use different accounts to test the different scenarios based on the browser. This shouldn't impact our production/live code at all though since we're using live accounts there anyways