Here is my braintree javascript code.
braintree.setup("<?=$clientToken?>", "custom", {
id: "checkout_prem",
paymentMethodNonceReceived: function (event, nonce) {
return false;
}
});
After i click on submit button it will submit the form that i don't want to.
Can anybody help me to solve this.
On the click callback of your form pass in the event and use the event.preventDefault();
use onPaymentMethodReceived instead of paymentMethodNonceReceived Then It will works:
Check this link for more information : Braintree - paymentMethodNonceReceived not being invoked
Thanks
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.