简体   繁体   English

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

[英]PayPal integration from Braintree sandbox error: PAYPAL_SANDBOX_ACCOUNT_NOT_LINKED

I got this error when I try to test my PayPal integration from Braintree.当我尝试从 Braintree 测试我的 PayPal 集成时,我遇到了这个错误。

Here is my client code (actually copy from official site and make little modification):这是我的客户端代码(实际上是从官方网站复制并稍作修改):

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
}

I have actually link my PayPal sandbox account (from the Braintree control panel) and surprisingly cannot find any useful information about this error.我实际上已经链接了我的 PayPal 沙箱帐户(来自 Braintree 控制面板),令人惊讶的是找不到关于此错误的任何有用信息。 Of course I have read through https://developers.braintreepayments.com/guides/paypal/testing-go-live/node#linked-paypal-testing .当然我已经通读了https://developers.braintreepayments.com/guides/paypal/testing-go-live/node#linked-paypal-testing

I finally turn out open another Braintree sandbox account solve this problem.我终于打开另一个 Braintree 沙箱帐户解决了这个问题。 It is weird however I cannot solve by anything else.这很奇怪,但是我无法通过其他任何方法解决。

Full disclosure: I work at Braintree.完全披露:我在布伦特里工作。 If you have any further questions, feel free to contact support .如果您有任何其他问题,请随时联系支持

There are two sandbox accounts that you need to link together: your Braintree sandbox , and your PayPal sandbox .您需要将两个沙箱帐户链接在一起:您的Braintree 沙箱和您的PayPal 沙箱

Double check that you have followed the instructions in Braintree's documentation to link your PayPal sandbox account to your Braintree sandbox account within the Control Panel .仔细检查您是否已按照Braintree 文档的说明将您的 PayPal 沙箱帐户链接到 控制面板中的Braintree 沙箱帐户。

If you continue to see this error, please contact Braintree Support for assistance.如果您继续看到此错误,请联系 Braintree 支持寻求帮助。

I have same issue.我有同样的问题。

Turns out Paypal need me to verify my phone number and email address.结果 Paypal 需要我验证我的电话号码和电子邮件地址。 But I haven't login to Paypal since 2016, so my information goes all wrong, finally I have to re-create my paypal account.但是我从2016年开始就没有登录Paypal,所以我的信息全错了,最后我不得不重新创建我的paypal账户。

Braintree doc: https://developer.paypal.com/braintree/docs/guides/paypal/testing-go-live#linked-paypal-testing布伦特里文档: https://developer.paypal.com/braintree/docs/guides/paypal/testing-go-live#linked-paypal-testing

You have to link your Paypal account to Braintree您必须将您的 Paypal 帐户链接到 Braintree

In order to link a PayPal sandbox test account to your Braintree sandbox account, you will need the API credentials for that PayPal sandbox test account.为了将PayPal 沙盒测试帐户链接到您的 Braintree 沙盒帐户,您将需要该 PayPal 沙盒测试帐户的 API 凭据。

If you don't already have a PayPal sandbox test account for testing your Braintree integration, create a new one by following these steps:如果您还没有用于测试 Braintree 集成的 PayPal 沙盒测试帐户,请按照以下步骤创建一个新帐户:

  1. Create a PayPal business sandbox account:创建一个 PayPal 业务沙箱帐户:

    • Log into the PayPal Developer Dashboard登录PayPal 开发人员仪表板
    • Navigate to Sandbox > Accounts导航到沙盒 > 帐户
    • Click Create Account单击创建帐户
    • Select the same Country as your Braintree sandbox account Select 与您的 Braintree 沙箱帐户相同的国家/地区
    • Select the account type as Business Select 账户类型为 Business
  2. Go to the Create New App page Go 到创建新应用页面

    • Create an app to get sandbox API credentials创建一个应用程序以获取沙箱 API 凭据
    • Select the same sandbox developer account as the test account created in step 1 Select 与步骤 1 中创建的测试帐户相同的沙盒开发者帐户
  3. Note the following Sandbox API Credentials for the new app you created:请注意您创建的新应用程序的以下沙盒 API 凭据:

    • Email address associated with this app Email 与此应用关联的地址
    • Client ID客户端编号
    • Secret秘密

Once you have those PayPal sandbox API credentials, enter them in your Braintree sandbox:获得 PayPal 沙箱 API 凭据后,将它们输入您的 Braintree 沙箱:

  1. Log into your Braintree sandbox Control Panel登录到您的Braintree 沙箱控制面板
  2. Navigate to Settings > Processing > Payment Methods > PayPal导航到设置 > 处理 > 付款方式 > PayPal
  3. Click Link Sandbox单击链接沙盒
  4. Enter the Email address, Client ID, and Client Secret for your PayPal sandbox test account为您的 PayPal 沙盒测试帐户输入 Email 地址、客户端 ID 和客户端密码
  5. Click Link PayPal Sandbox点击链接 PayPal 沙盒

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM