Sometimes I get HTTP status code 406 when trying to get approval link: <html>
<head><title>406 Not Acceptable</title></head>
<body bgcolor="white">
<center><h1>406 Not Acceptable</h1></center>
<hr><center>nginx/1.14.0 (Ubuntu)</center>
</body>
</html> When calling the same function with same settings directly after failing, the excpetion is mostly gone and everything works fine. Yesterday nearly every second call failed. I've nothing changed within the system for weeks. I use https://github.com/paypal/PayPal-PHP-SDK in version 1.14.0 My code (excerpt): $payer = new \PayPal\Api\Payer();
$payer->setPaymentMethod('paypal');
$amount = new \PayPal\Api\Amount();
$amount->setTotal($orderTotal);
$amount->setCurrency('EUR');
$transaction = new \PayPal\Api\Transaction();
$transaction->setAmount($amount);
$redirectUrls = new \PayPal\Api\RedirectUrls();
$redirectUrls->setReturnUrl($returnURL)->setCancelUrl($cancelURL);
$payment = new \PayPal\Api\Payment();
$payment->setIntent('sale')
->setPayer($payer)
->setTransactions(array($transaction))
->setRedirectUrls($redirectUrls)
->setExperienceProfileId($paypalWebprofileid);
try {
$payment->create($apiContext);
$payPalURL = $payment->getApprovalLink();
header("Location: ".$payPalURL);
} catch (\PayPal\Exception\PayPalConnectionException $ex) {
$exception = $ex->getData();
return $exception;
} It seems to me like an issue on PayPal. Same problem anyone? Hints for solving? Thanks for every hint.
... View more