0
votes

I'm trying to use the paypal checkout flow with the braintree dropin. The vault flow works without issues but I'd prefer to use the checkout flow.

The client code:

braintree.dropin.create({
  paymentOptionPriority: paymentOptionPriority,
  authorization: client_token,
  container: '#bt-dropin',
  paypal: {
    flow: 'checkout',
    amount: 300.00,
    currency: 'EUR'
  }
}, function (createErr, instance) {
  form.addEventListener('submit', function (event) {
  event.preventDefault();
  instance.requestPaymentMethod(function (err, payload) {
    if (err) {
      console.log('Error', err);
      return;
    }

    document.querySelector('#nonce').value = payload.nonce;
      form.submit();
    });
  });
});

After pressing the Paypal checkout button the user gets directed to Paypal and the result is successful. The paypal payment method gets a green check mark in the dropin. When I then submit the form and the server sends the transaction request to braintree I get the following result:

Transaction.Status.FAILED
ProcessorResponseCode: 3000
ProcessorResponseText: Processor Network Unavailable - Try Again
1

1 Answers

0
votes

It was actually a silly mistake. My hard coded test value in the client code was not matching up with the amount on the server side so Paypal was authorizing a different amount than was sent to the Braintree Gateway.