来自Braintree沙盒的PayPal集成错误:PAYPAL_SANDBOX_ACCOUNT_NOT_LINKED

wde*_*tac 5 javascript paypal braintree

当我尝试从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;
        }
    });
});
Run Code Online (Sandbox Code Playgroud)
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
}
Run Code Online (Sandbox Code Playgroud)

我实际上已经链接了我的PayPal沙箱帐户(来自Braintree控制面板),并且令人惊讶地找不到关于此错误的任何有用信息。当然,我已经阅读了https://developers.braintreepayments.com/guides/paypal/testing-go-live/node#linked-paypal-testing

wde*_*tac 6

我终于打开另一个 Braintree 沙箱帐户解决了这个问题。这很奇怪,但是我无法通过其他任何方法解决。


小智 5

全面披露:我在布伦特里工作。如果您还有任何其他问题,请随时联系支持人员

您需要将两个沙箱帐户链接在一起:您的Braintree 沙箱PayPal 沙箱

仔细检查您是否已按照Braintree 文档中的说明将 PayPal 沙盒帐户链接到控制面板中的 Braintree 沙盒帐户。

如果您仍然看到此错误,请联系 Braintree 支持寻求帮助。