Payment execution returns "Client Authentication failed" error

OrCam
Contributor
Contributor

Hi,

Trying to execute a payment using PHP-SDK, all the process goes well until the execution.

 

$payment = \PayPal\Api\Payment::get($paymentId, $this->apiContext);

$execution = new \PayPal\Api\PaymentExecution();
$execution->setPayerId($payerID);
try {
$result = $payment->execute($execution, $this->apiContext);
try {
$payment = PayPal\Api\Payment::get($paymentId, $this->apiContext);
} catch (Exception $ex) {
exit(1);
}
} catch (Exception $ex) {
exit(1);
}

Running the execution function failed every time with the same "Client Authentication failed" error.

 

Why the authentication failed only for the execution? what i'mdoing wrong?

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.