Braintree - paymentMethodNonceReceived not being invoked

后端 未结 3 2110
甜味超标
甜味超标 2021-01-02 11:30

I have setup dropin UI for braintree. I can see the UI fine. Before that I created the customer and I can see the customer on braintree-sandbox. Now I want to add payment me

3条回答
  •  青春惊慌失措
    2021-01-02 12:22

    https://github.com/braintree/braintree-web/issues/58

    For custom integration with multiple payment method, use onSuccess instead of onPaymentMethodReceived.

    braintree.setup(TOKEN, 'custom', {
      id: 'checkout',
      paypal: {
        container: 'paypal-container',
        onSuccess: function (nonce, email) {
          // This will be called as soon as the user completes the PayPal flow
          // nonce:String
          // email: String
        }
      },
      onPaymentMethodReceived: function(obj) {
        // This will be called when the user submits the form
      }
    });
    

提交回复
热议问题