gpt4 book ai didi

javascript - Braintree PayPal结账组件抛出 "e.client.getVersion is not a function"

转载 作者:行者123 更新时间:2023-11-29 19:03:28 25 4
gpt4 key购买 nike

我很难理解我在这里做错了什么:

 braintree.client.create({
authorization: res.clientToken // this is the token, I know it is correct
}, (err, client) => {
if (err) { ... }
braintree.paypalCheckout.create({ client }, (err, paypalInstance) => {
if (...) { ... }
})
});

调用braintree.paypalCheckout.create时,同步调用出错:

Uncaught TypeError: e.client.getVersion is not a function

事实上,client 对象没有这样的方法。我遵循 this page 中的代码和 this page (几乎相同的事情)。

如何解决这个问题? PayPal Checkout 组件已加载并附加到 braintree 对象。

最佳答案

全面披露:我在 Braintree 工作。如果您还有任何疑问,请随时联系support .

getVersionclientas of version 3.16.0 的一个方法Braintree-web 的。更新braintree-web版本您使用的是 3.16.0+。

关于javascript - Braintree PayPal结账组件抛出 "e.client.getVersion is not a function",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44946736/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com