square / in-app-payments-react-native-plugin

Apache License 2.0
118 stars 50 forks source link

Error with Google Pay #216

Closed AkbarBakhshi closed 1 year ago

AkbarBakhshi commented 1 year ago

Describe your question

I have set up Apple Pay, pay with a card, and Google Pay with this plugin on my app. Everything but Google Pay works fine. When I tap on the button that should open the Google Pay sheet, the spinner is displayed for a couple of seconds and then I get this message:

Request failed. This Merchant is having trouble accepting your payment right now [OR_BIBED_11]

IMG_9334

I have followed the steps in the ReadMe here. I don't see anything similar to adding Merchant ID for Apple Pay in the Google Pay docs so I am pretty sure I have done everything mentioned in the ReadMe. Are there any other steps that I need to take, maybe on the Google Pay side of things to fix this issue?

AkbarBakhshi commented 1 year ago

Do I need to complete this process (Request production access) for Google Pay? I don't see any mention of this in the documentation though.

https://developers.google.com/pay/api/android/guides/test-and-deploy/request-prod-access

AkbarBakhshi commented 1 year ago

Update: It seems like the SQIPGooglePay.EnvironemtProduction is the issue. With SQIPGooglePay.EnvironmentTest, I don't see any errors and the Google Pay modal sheet appears just fine.

fka3 commented 1 year ago

You do need to request prod access; a public explanation is here.

The test environment is for testing, so Google doesn't much care who is using that and it will always work. Production, however, has higher scrutiny, and in particular the usual banking regulations mean Google needs to know who the money is going to. (Among other uses, this is a check that it's not going to known drug cartels, terrorists, etc., so pretty much any financial transfer is going to need some sort of registration.)

We should update our documentation to mention this; however, it's not "to use the Square SDK, you must..." but is instead "to use Google Pay at all, Square or not, you must..."