我们不想使用 Braintree 的 dropin 表单来坚持我们的 UI。 到目前为止,我们只有抄送字段的付款表格运行良好。我们设置了 braintree.js:
braintree.setup(token, "custom", {
id: "options"
});
然后是 PayPal,我们将 PayPal 容器添加到设置中:
braintree.setup(token, "custom", {
id: "options",
paypal: {
container: "paypal-button"
}
});
直到上周六,一切都在本地运行。通过挖掘,我发现在填写 CC 字段时,payment_method_nonce 不再发送到服务器:
尽管随机数输入出现在我的表单中的客户端!!!
那么这是怎么回事呢? braintree.js 是否以某种方式与表单提交进行交互?为什么这个 payment_method_nonce 有时会在服务器端检索(当通过 PayPal 支付时)有时不会(当通过 CC 支付时)?
谢谢
最佳答案
你快到了。当您使用自己的带有附加 PayPal 按钮的信用卡表格时,您需要使用“自定义”作为集成方法:
braintree.setup(token, "custom", {
id: "options",
paypal: {
container: "paypal-button"
}
});
关于javascript - 拥有 CB 和 PayPal 的 Braintree 自定义表单,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26718434/