此商户帐户不接受付款工具类型。PayPal Express签出/Braintree PHP SDK

此商户帐户不接受付款工具类型。PayPal Express签出/Braintree PHP SDK,php,laravel-5,paypal,braintree,Php,Laravel 5,Paypal,Braintree,当我使用Braintree PHP SDK进行PayPal Express结帐交易时,收到此错误: "Payment instrument type is not accepted by this merchant account." 以下是错误的详细信息: 提供支付方式令牌时,必须将您的商户帐户配置为接受令牌表示的支付方式类型 代码如下: public function createPayPalGateway() { $gateway = new \Braintree_Gateway

当我使用Braintree PHP SDK进行PayPal Express结帐交易时,收到此错误:

"Payment instrument type is not accepted by this merchant account."
以下是错误的详细信息:

提供支付方式令牌时,必须将您的商户帐户配置为接受令牌表示的支付方式类型

代码如下:

public function createPayPalGateway() {
    $gateway = new \Braintree_Gateway(array(
        'accessToken' => 'access_token$production$**',
    ));
    return $gateway;
}
        // Charge Nonce
        $result = $gateway->transaction()->sale([
          'amount' =>$amount,
          'paymentMethodNonce' => $nonce,
          'options' => [
            'submitForSettlement' => True
          ]
        ]);

但是,如何实现此配置?代码里有什么东西吗?我没有访问PayPal帐户的权限,经理只是向我发送了访问令牌。

根据您的Braintree帐户的设置方式,您可能需要在创建交易时传递
merchantAccountId

transaction()->sale([
  'amount' =>$amount,
  'paymentMethodNonce' => $nonce,
  'merchantAccountId' => $yourMerchantAccountId,
  'options' => [
    'submitForSettlement' => True
  ]
])
你可以在Braintree文档中引用这一点


希望有帮助

此错误可能与商户帐户配置有关,我建议您联系Braintree支持部门support@getbraintree.com. 他们可能需要您的帮助。请不要在您的答案中附加链接。如果链接过期怎么办?谢谢,Nisarg!这是一个很好的观点。我已经更新了我的答案以排除链接。事实上,在SO答案中链接到外部材料没有什么错,只要你也将相关信息/代码片段复制并粘贴到答案中。事实上,这是受到鼓励的。死链接总是可以更新的。资料来源: