[英]When does braintree drop in ui create payment method nonce?
I'm trying to integrate Braintree Drop In UI into a meteor app I'm working on. 我正在尝试将Braintree Drop In UI集成到我正在处理的流星应用程序中。 I've gotten the server to create a token for the client to create the drop in container. 我已经获得服务器来为客户端创建令牌以创建放置容器。 However I can't get it to create a payment method nonce. 但是我无法创建付款方式随机数。 I'm using the callback for the nonce is created, but it isn't triggering when I submit. 我正在为创建的现时使用回调,但是在我提交时它不会触发。
This is the code for the container. 这是容器的代码。
braintree.setup(response, 'dropin', {
container: 'dropin-container',
onPaymentMethodReceived: function(data) {
Meteor.call('createCustomer', data.nonce);
}
});
And this is the meteor event for submitting the form. 这是提交表单的流星事件。
Template.reservePage.events({
'submit #paymentForm': function(event) {
event.preventDefault();
FlowRouter.go('/dashboard');
console.log("submitted");
}
});
Is there supposed to be a method to call to trigger braintree to create a nonce? 是否应该有一种方法来触发触发树来创建随机数?
(Posted on behalf of the OP) . (代表OP张贴) 。
The issue was that the drop in was wrapped in another form inside the original form that was there. 问题在于,下拉列表以另一种形式包装在原来的表单中。 So when I submitted, it didn't register that the form it was in was submitted. 因此,当我提交时,它并没有注册提交的表单。 Make sure it's only inside the one form! 确保它只在一种形式内!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.