Closed AACKL closed 5 years ago
Hi @AACKL
Your manifest wasn't posted so I wasn't able to verify it but given that you're getting nonces back so the Android integration looks fine.
Unfortunately thats as much support as I can give here since this is support issues for the SDK itself and not Braintree overall. You can reach out to our Braintree support team who are better equipped to help you with issues with the gateway and transactions.
Please reach out to our support team referencing this issue and your sandbox merchant ID so we can troubleshoot what is going wrong. https://help.braintreepayments.com/
General information
Issue description:
Credit and Debit payment is working fine but payment via paypal is throwing me this: "Braintree\Result\Error[errors=[Braintree\Error\ValidationErrorCollection/errors:[( )]], params=transaction=type=sale, amount=99, paymentMethodNonce=69bf1023-ca71-0b65-698c-daa1416a3e66, options=submitForSettlement=true, message=Cannot use a payment_method_nonce more than once., creditCardVerification=, transaction=, subscription=, merchantAccount=, verification=]"
Paypal sandbox and Braintree sandbox shows that the transaction went through: https://drive.google.com/file/d/1naZB-TqvUG9eeHkzshs7zYjrTN8Q0E8x/view?usp=sharing https://drive.google.com/file/d/1WXyp55zxrP4GMmZWPJnQWRhnxWV9w8B3/view?usp=sharing
Also, I've recorded the nonce for the last 2 transaction and it shows that they're completely different to each other: Transaction 1: cabb5b89-db44-0937-5fca-b36f5e6c8764 Transaction 2: b2026353-6edd-07c6-630b-b6b6eca87dab
I've added this on my manifest: <activity android:name="com.braintreepayments.api.BraintreeBrowserSwitchActivity" android:launchMode="singleTask">
OnActivityResult: if (requestCode == REQUEST_CODE){ if (resultCode == RESULT_OK){ DropInResult result = data.getParcelableExtra(DropInResult.EXTRA_DROP_IN_RESULT); PaymentMethodNonce nonce = result.getPaymentMethodNonce(); String strNonce = nonce.getNonce();
How I send the nonce back to the server: RequestQueue queue = Volley.newRequestQueue(PaymentActivity.this); StringRequest stringRequest = new StringRequest(Request.Method.POST, API_CHECK_OUT, new Response.Listener() {
@Override
public void onResponse(String response) {
if (response.contains("Successful")){
Toast.makeText(PaymentActivity.this, "Transacton successful!", Toast.LENGTH_SHORT).show();
}
else{
Toast.makeText(PaymentActivity.this, "Transaction Failed", Toast.LENGTH_SHORT).show();
}