Closed sumitAmble closed 4 years ago
This will be best to troubleshoot with our support team. Reach out to them: https://help.braintreepayments.com/
Hi, this works if you use the mocked PayPal flow in sandbox. Once you add a sandbox account to your BT sandbox account you need to use a real nonce
General information *braintree-java-2.107.0
Environment: Sandbox Example: Java 1.8.0_101-b13 on Ubuntu 20.04 --> Issue description I am creating the transaction with braintree sandbox account with "fake-paypal-one-time-nonce" but my transaction is getting declined i saw the whole response message as "Declined" i tried almost everything i could but nothing helped me so i am asking for help here. my code is as follows
TransactionRequest request = new TransactionRequest() .amount(new BigDecimal("10.00")) .paymentMethodNonce(com.braintreegateway.test.Nonce.PayPalOneTimePayment) .options() .submitForSettlement(true) .done(); Result<Transaction> result = gateway.transaction().sale(request); if (result.isSuccess()) { result.getMessage(); } else { System.out.println(result.getMessage()); }
please help me with that let me know if you need more info on this.Thanks!