【问题标题】:Payment instrument type is not accepted by this merchant account. PayPal Express Checkout / Braintree PHP SDK此商家帐户不接受付款方式。 PayPal Express Checkout / Braintree PHP SDK
【发布时间】:2019-01-13 11:35:44
【问题描述】:

我在使用 Braintree PHP SDK 进行 PayPal Express Checkout 交易时收到此错误:

"Payment instrument type is not accepted by this merchant account."

These是错误的详细信息:

"在提供支付方式令牌时,您的商家帐户必须配置为接受该令牌所代表的支付方式类型。"

这是代码:

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 Support support@getbraintree.com。他们可能需要您的merchant ID。

标签: php laravel-5 paypal braintree


【解决方案1】:

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

transaction()->sale([
  'amount' =>$amount,
  'paymentMethodNonce' => $nonce,
  'merchantAccountId' => $yourMerchantAccountId,
  'options' => [
    'submitForSettlement' => True
  ]
])

您可以在 Braintree 文档中引用此内容。

希望有帮助!

【讨论】:

  • 请不要在答案中附加链接。链接过期了怎么办?
  • 谢谢,尼萨尔!那是个很好的观点。我已更新我的答案以排除链接。
  • 实际上,在 SO 答案中链接到外部材料没有任何问题,只要您还将相关信息/代码 sn-ps 复制并粘贴到答案中即可。事实上,这是鼓励的。死链接可以随时更新。来源:meta.stackexchange.com/a/7659
猜你喜欢
  • 2017-08-22
  • 2018-03-27
  • 2017-10-14
  • 2018-03-27
  • 2013-05-06
  • 2014-07-18
  • 2015-04-24
  • 2023-03-25
  • 1970-01-01
相关资源
最近更新 更多