1

I am implementing braintree in my android app.

The Credit or Debit Card payment is working fine.

Also the Paypal payment working fine, but I'm getting an error in the response.

Here is what I get, when I use PayPal payment.

Final Response: Braintree\Result\Error[errors=[Braintree\Error\ValidationErrorCollection/errors:[( )]], params=transaction=type=sale, amount=79, paymentMethodNonce=26333efd-40f6-00f4-5d9f-46353000f082, options=submitForSettlement=true, message=Cannot use a payment_method_nonce more than once., creditCardVerification=, transaction=, subscription=, merchantAccount=, verification=]
Oğuzhan Döngül
  • 7,856
  • 4
  • 38
  • 52
Joe
  • 387
  • 1
  • 7
  • 22

2 Answers2

1

I was getting the same problem and finally figured it out. The culprit was my Volley network API which i was using to submit the POST request and to call TransactionRequest on server side. When there is delay in response it submitted the request again. I made the retry option to '0' and everything fixed. How? check this Android volley sending data twice

0

paymentMethodNonce=26333efd-40f6-00f4-5d9f-46353000f082

is Unique so try generating difference nonce and hit the api

optimus
  • 729
  • 2
  • 12
  • 36