Google Payment is activated on sandbox.braintreegateway.com Used packages for payment:
- "react-native-payments"
- "com.google.android.gms:play-services-wallet:19.0.1"
android/build.gradle
buildscript { repositories { google() jcenter() mavenCentral() } } allprojects { repositories { mavenLocal() } google() jcenter() mavenCentral() maven { url 'https://www.jitpack.io' } }
This is my configuration where I use braintreeClientToken which is returned from server and also I use Merchant ID which I take from this page https://sandbox.braintreegateway.com/merchants/{merchantID}/merchant_accounts/info
const METHOD_DATA = [{
supportedMethods: ['android-pay'],
data: {
supportedNetworks: ['visa', 'mastercard', 'amex'],
allowedPaymentMethods: [1, 2],
currencyCode: 'EUR',
environment: 'TEST',
countryCode: 'IT',
paymentMethodTokenizationParameters: {
tokenizationType: 'GATEWAY_TOKEN',
parameters: {
gateway: 'braintree',
publicKey: braintreeClientToken,
'braintree:apiVersion': 'v1',
'braintree:merchantId': merchantID,
},
},
},
},
];
But when I finishing payment It returns error inside PaymentResponse.
"{"error":{"message":"Authorization fingerprint is invalid"},"fieldErrors":[{"field":"authorizationFingerprint","code":"93201","message":"Authorization fingerprint is required"}]}"