问题
I'm trying to implement a payment request for google pay natively on Android for a custom merchant and I'm receiving this error:
This merchant is not enabled for Google Pay
.
When I tried to resolve what exception is thrown I found this:
com.google.android.gms.common.api.ResolvableApiException: 6: BuyFlow UI needs to be shown.
at com.google.android.gms.common.internal.ApiExceptionUtil.fromStatus(Unknown Source:3)
at com.google.android.gms.wallet.AutoResolveHelper.zza(com.google.android.gms:play-services-wallet@@18.0.0:18)
at com.google.android.gms.internal.wallet.zzy.zza(com.google.android.gms:play-services-wallet@@18.0.0:4)
at com.google.android.gms.internal.wallet.zzt.dispatchTransaction(com.google.android.gms:play-services-wallet@@18.0.0:63)
at com.google.android.gms.internal.wallet.zza.onTransact(com.google.android.gms:play-services-wallet@@18.0.0:13)
at android.os.Binder.execTransact(Binder.java:731)
And my request looks like this:
{
"apiVersion":2,
"apiVersionMinor":0,
"allowedPaymentMethods":[
{
"type":"CARD",
"parameters":{
"allowedAuthMethods":[
"PAN_ONLY",
"CRYPTOGRAM_3DS"
],
"allowedCardNetworks":[
"AMEX",
"MASTERCARD",
"VISA"
]
},
"tokenizationSpecification":{
"type":"PAYMENT_GATEWAY",
"parameters":{
"gateway":"gateway",
"gatewayMerchantId":"124185"
}
}
}
],
"transactionInfo":{
"currencyCode":"PLN",
"totalPriceStatus":"FINAL",
"totalPrice":"2.00"
},
"merchantInfo":{
"merchantId":"9876143410",
"merchantName":"Test Merchant",
"merchantOrigin":"localhost"
}
}
The issue is that I'm using a TEST environment so I don't see why this message should be shown at all.
回答1:
I think you might need to make an agreement with Google to get enabled. My gues is you might not progress with testing as well if you don't proceed with agreent (which may unlock testing opportunities).
Logically they don't have entries of your testing organisation / PSP provider, so they won't know how to process the given data. For this reason google has testing PSP ready.
If you want to get confirmed as PSP by google, i bet you have to sign up with them and then you might get all the needed info for implementing services between google and your organisation.
Try following the link: https://developers.google.com/pay/api#participating-processors
find the "Participating processors" paragraph and choose to "fill out an onboarding request" in the PSP section.
After moving through the process you might get more clues on what has to be done.
来源:https://stackoverflow.com/questions/59155390/this-merchant-is-not-enabled-for-google-pay-on-test-environment