Closed peterujah closed 3 years ago
Hi @peterujah thanks for using the Braintree SDK for Android.
As a first step, I would recommend upgrading to the latest version of our core/drop-in SDKs and see if the issue persists. I would also verify that your Braintree and PayPal sandbox accounts are linked.
Is it upgrading drop-in SDK could be causing the problem? If that is the case am not using drop-in, I mentioned above that I also tried using drop-in. but no luck.
Currently my minSdkVersion 19
and targetSdkVersion 30
, I can upgrade the minSdkVersion 19
because my client doesn't want to loss support for some older device.
Hello there i am facing this issue too. Help me to solve this.
@peterujah As an exercise, can you try upgrading the core sdk to com.braintreepayments.api:braintree:3.12.0
to see if that solves the issue? We suggest our merchants update regularly to the latest version of the SDK to take advantage of active development and bug fixes.
Otherwise, version v2.21.0 is the last 2.x version we have. Also, make sure you're using a Client Token and not a Tokenization key when creating a new BraintreeFragment
.
Hi @peterujah and @BeantSingh96, were you able to resolve this issue?
hi,I also encountered the same problem
E/paypal: ErrorWithResponse (422): Parsing error response failed []
The version used is
implementation 'com.braintreepayments.api:braintree:3.16.1'
hi,I also encountered the same problem
E/paypal: ErrorWithResponse (422): Parsing error response failed []
The version used isimplementation 'com.braintreepayments.api:braintree:3.16.1'
Try doing this in your php
<?php
$gateway = new Braintree\Gateway([/....../]);
$theCustomer = "test123";
try{
$result = $gateway->customer()->find($theCustomer);
$customer_id = $result->id;
} catch (Braintree\Exception\NotFound $e) {
//Create customer if not exist
$result = $gateway->customer()->create([
'id' => $theCustomer,
'firstName' => "Peter",
'lastName' => "U",
'phone' => "00000000",
'email' => "peter@example.com",
// 'paymentMethodNonce' => nonceFromTheClient
]);
$customer_id = $result->customer->id;
}
$BrainTreeClientToken = $gateway->clientToken()->generate([
"customerId" => $customer_id
]);
Am implementing Braintree Credit Card & PayPal using Android & PHP. From my backend I have below line of code to generate token. Everything works fine when I tried credit card both in custom form and dropin integration, but for PayPal I kept getting errors.
Then implementing this on android as below
But am always getting below error
I also tried using dropin but not luck.
SDK/Library version: Example: 2.22.0 Environment: Sandbox Android Version and Device: Samsung M40, version 10 Braintree dependencies: com.braintreepayments.api:braintree:x.y.z