Closed whysetiawan closed 6 years ago
What iOS version are you running? It's possibly related to #31
i'm using android, i tried to show the android pay but i got that error
Hi, have the same error
Hi, I encountered the same error. Fixed the unhandled rejection here. I'd open a pull request but don't want to create diff conflicts with other pull requests. This fix didn't help me find out the cause of the "10" error code. I used logcat and saw a detailed error message from the package WalletMerchantError. In my case it was complaying about the invalid publicKey. Hope this information helps :)
excuse me, where to find the publicKey? i have no idea...
many thanks
I'm getting this too, using the publicKey provided by Braintree — perhaps that's not the one I'm supposed to be using?
Okay, it works if you set your gateway
parameter correctly, and set the publicKey to your public key from e.g braintree, and also set GATEWAY_TOKEN
(instead of NETWORK_TOKEN
as the documentation shows). Now i get another unhandled promise rejection, but it's some progress at least
Documentation shows:
{
supportedMethods: ['android-pay'],
data: {
supportedNetworks: ['visa', 'mastercard', 'amex'],
currencyCode: 'USD',
environment: 'TEST', // defaults to production
paymentMethodTokenizationParameters: {
tokenizationType: 'NETWORK_TOKEN',
parameters: {
publicKey: 'YOUR KEY HERE',
},
},
},
}
}
What got me a bit further:
{
supportedMethods: ['android-pay'],
data: {
supportedNetworks: ['visa', 'mastercard', 'amex'],
currencyCode: 'USD',
environment: 'TEST', // defaults to production
paymentMethodTokenizationParameters: {
tokenizationType: 'GATEWAY_TOKEN',
parameters: {
gateway: 'braintree',
publicKey: 'PUBLIC KEY FROM BRAINTREE',
},
},
},
}
}
Could you post more info on rejection?
I think I solved it by finding the correct public key somewhere in the Play Console (if I remember correctly), but ended up having to scrap it all anyway because Google Play isn't available in my country :(
What a pity :-/
Anyone figured out what the solution is ?
Where should we find the public key?
Same problem here, I give up.... by the way, you can get publicKey from here https://payments.developers.google.com/paymentmethodtoken/test/keys.json
I had this issue too. It's because your linking with react native having problem, check your MainApplication.java and be sure that react native payments included
For me, it works only with "GATEWAY_TOKEN" type and "braintree" or "stripe" gateway. Is it really necessary to use one of them?
I am still getting the same issue, any fix ?
I have tried the one given here worked for me https://developers.google.com/pay/api/android/guides/resources/payment-data-cryptography#using-openssl BOdoXP+9Aq473SnGwg3JU1aiNpsd9vH2ognq4PtDtlLGa3Kj8TPf+jaQNPyDSkh3JUhiS0KyrrlWhAgNZKHYF2Y=
Follow the steps at secant: Use OpenSSL to generate a public key(https://developers.google.com/pay/api/android/guides/resources/payment-data-cryptography#using-openssl) And then use the public key.
Hello guys, i am newbie in react native. Then i'm learning about this library. I just try to show react-native-android payments. But when i click the button i got an error .