【发布时间】:2018-10-13 07:44:33
【问题描述】:
我在尝试从 Braintree 测试我的 PayPal 集成时收到此错误。
这是我的客户端代码(实际上是从官方网站复制并稍作修改):
braintree.client.create({
authorization: ClientToken
}, function(err, clientInstance) {
if (err) {
console.error(err);
return;
}
// Create a PayPal Checkout component.
braintree.paypalCheckout.create({
client: clientInstance
}, function (paypalCheckoutErr, paypalCheckoutInstance) {
// Stop if there was a problem creating PayPal Checkout.
// This could happen if there was a network error or if it's incorrectly
// configured.
if (paypalCheckoutErr) {
console.error('Error creating PayPal Checkout:', paypalCheckoutErr); // Error from this line
return;
}
});
});
Error creating PayPal Checkout:
{
name: "BraintreeError",
code: "PAYPAL_SANDBOX_ACCOUNT_NOT_LINKED",
message: "A linked PayPal Sandbox account is required to use PayPal Checkout in Sandbox. See https://developers.braintreepayments.com/guides/paypal/testing-go-live/#linked-paypal-testing for details on linking your PayPal sandbox with Braintree.",
type: "MERCHANT",
details: undefined
}
我实际上已经链接了我的 PayPal 沙盒帐户(从 Braintree 控制面板),但令人惊讶的是找不到任何有关此错误的有用信息。当然,我已经阅读了https://developers.braintreepayments.com/guides/paypal/testing-go-live/node#linked-paypal-testing。
【问题讨论】:
标签: javascript paypal braintree