Having a special Braintree form with CB and PayPal
We don't want to use the Braintree eyebrow shape to stick with our UI. So far, our payment form has worked fine with only CC fields. We created the braintree.js file:
braintree.setup(token, "custom", {
id: "options"
});
Then PayPal came along and we added the PayPal container to the setup:
braintree.setup(token, "custom", {
id: "options",
paypal: {
container: "paypal-button"
}
});
Everything worked locally until last Saturday. Digging, I found out that payment_method_nonce was no longer sent to the server when filling in the CC fields:
although the nonce input is present on the client side in my form !!!
And what is there? Is braintree.js interacting with form submission in some way? Why is this payment_method_nonce sometimes retrieved on the server side (when paying with PayPal) and sometimes not (when paying with CC)?
thank
source to share
Okay, it turns out that the problem was on Braintree's side.
Using https://js.braintreegateway.com/v2/braintree.js with braintree.js version greater than 2.2.4 solves the problem.
source to share