Braintree给出了无法使用Braintree JS Integration进行字符串化的事件

时间:2016-05-24 12:11:45

标签: javascript braintree braintree-data

将Braintree与js一起使用,但低于错误

Uncaught Error: Could not stringify event: JSON.stringify is not a function

我在表格中添加了div(jsp页面)

<div id="paypal-container">   <input type="submit" name="btnSub" value="Pay" id="btnSub"/>
</div>

在js 调用ajax从api接收客户端令牌 和

  braintree.setup(""+clientToken+"", "dropin", {
                     id: 'paypal-container',
                      paypal: {
                        container: "paypal-container",
                        onSuccess: function (nonce, email) {
                            console.log("email"+nonce+"\t "+email);
                              }
                      },
                      hostedFields: {
                          number: {
                            selector: "**** ****  1111 1111"
                          },
                          cvv: {
                            selector: "***"
                          },
                          expirationMonth: {
                            selector: "12"
                          },
                          expirationYear: {
                            selector: "2018"
                          }
                        },

                      onPaymentMethodReceived: function (obj) {
                          console.log(obj);
                          alert('onPaymentMethodReceived');
                        },
                        onError :function(obj){
                            alert('onError');

                       }
                    });

我在jquery load上运行它但是超出了异常 请帮忙。

0 个答案:

没有答案