【问题标题】:Braintree Payment gateway : paymentMethodNonceReceived unable to stop submitting formBraintree 支付网关:paymentMethodNonceReceived 无法停止提交表单
【发布时间】:2014-12-06 23:44:14
【问题描述】:

这是我的 Braintree javascript 代码。

braintree.setup("<?=$clientToken?>", "custom", {
    id: "checkout_prem",
    paymentMethodNonceReceived: function (event, nonce) {
        return false;
    }
});

点击提交按钮后,它会提交我不想提交的表单。

谁能帮我解决这个问题。

【问题讨论】:

    标签: javascript php forms braintree


    【解决方案1】:

    使用 onPaymentMethodReceived 而不是 paymentMethodNonceReceived 然后它将起作用:

    查看此链接以获取更多信息Braintree - paymentMethodNonceReceived not being invoked

    谢谢

    http://www.web-technology-experts-notes.in

    【讨论】:

      【解决方案2】:

      在表单的点击回调中传入事件并使用 event.preventDefault();

      http://api.jquery.com/event.preventdefault/

      【讨论】:

        猜你喜欢
        • 2023-03-25
        • 1970-01-01
        • 1970-01-01
        • 2015-10-08
        • 1970-01-01
        • 2016-05-01
        • 2017-02-04
        • 2015-03-20
        • 2013-05-12
        相关资源
        最近更新 更多