簡體   English   中英

此商家帳戶不接受付款方式類型。 PayPal Express結帳/ Braintree PHP SDK

[英]Payment instrument type is not accepted by this merchant account. PayPal Express Checkout / Braintree PHP SDK

使用Braintree PHP SDK進行PayPal Express Checkout交易時,我收到此錯誤:

"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帳戶的權限,經理只是向我發送了訪問令牌。

根據您的布倫特里帳戶的設置方式,您可能需要沿着傳遞merchantAccountId當您創建您的交易。

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

您可以在Braintree文檔中引用它。

希望有幫助!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM