lundi 6 août 2018

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

I'm receiving this error when I make a PayPal Express Checkout transaction using Braintree PHP SDK:

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

These are the details of the error:

"When providing a payment method token, your merchant account must be configured to accept the payment method type represented by the token."

This is the code:

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
          ]
        ]);

However, how do I implement this configuration? Is it something in the code? I don't have access to the PayPal account, the manager just sent me the access token.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire