Got Http response code 500 when accessing https://api.sandbox.paypal.com/v1/payments/payment/PAY- ******************** / execute
Maybe someone knows why this error. Not so long ago, everything was perfectly tested and no one changed anything. Today, the test and here is the result, this is after paying a test for a verification request. Project on yii2. Piece of code
$apiContext = new ApiContext( new OAuthTokenCredential( '***', // ClientID '***' // ClientSecret ) ); $payerId = $_GET['PayerID']; $paymentId = $user->paypal; $payment = Payment::get($paymentId, $apiContext); $execution = new PaymentExecution(); $execution->setPayerId($payerId); try { $result = $payment->execute($execution, $apiContext); } catch (Exception $e) { Yii::$app->session->setFlash( 'error', 'Платёж не был совершён' ); return $this->redirect('index'); }