PayPal integration from Braintree sandbox error: PAYPAL_SANDBOX_ACCOUNT_NOT_LINKED

PayPal integration from Braintree sandbox error: PAYPAL_SANDBOX_ACCOUNT_NOT_LINKED

我在尝试从 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
}

我实际上有 link 我的 PayPal 沙箱帐户(来自 Braintree 控制面板),令人惊讶的是找不到任何关于此错误的有用信息。 https://developers.braintreepayments.com/guides/paypal/testing-go-live/node#linked-paypal-testing.

我当然看完了

完全披露:我在 Braintree 工作。如果您有任何其他问题,请随时联系 support

您需要 link 两个沙盒帐户:您的 Braintree sandbox, and your PayPal sandbox.

仔细检查您是否遵循了 Braintree's documentation to link your PayPal sandbox account to your Braintree sandbox account within the Control Panel 中的说明。

如果您继续看到此错误,请contact Braintree Support寻求帮助。

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

我有同样的问题。

原来 Paypal 需要我验证我的 phone 号码和电子邮件地址。但是我从2016年开始就没有登录过Paypal,所以我的信息全错了,最后我不得不重新创建我的paypal账户。