我在我的网站上使用Laravel 4.2,我正在设置付款。它似乎可以很好地获得PayPal,但是当返回我的网站时,我得到500错误......
Got Http response code 500 when accessing https://api.sandbox.paypal.com/v1/payments/payment/PAY-6FJ919999H125543PK3G4NAY/execute.
我正在记录事情并且可以看到,就在500次踢之前我在日志中得到以下内容:
[24-02-2016 03:05:08] PayPal\Core\PayPalHttpConnection: INFO : Response Status : 200
[24-02-2016 03:05:08] PayPal\Core\PayPalHttpConnection: INFO : POST https://api.sandbox.paypal.com/v1/payments/payment/PAY-6FJ919999H125543PK3G4NAY/execute
[24-02-2016 03:05:08] PayPal\Core\PayPalHttpConnection: INFO : Invalid or no certificate authority found - Retrying using bundled CA certs file
[24-02-2016 03:05:23] PayPal\Core\PayPalHttpConnection: INFO : Response Status : 500
[24-02-2016 03:05:23] PayPal\Core\PayPalHttpConnection: ERROR : Got Http response code 500 when accessing https://api.sandbox.paypal.com/v1/payments/payment/PAY-6FJ919999H125543PK3G4NAY/execute. {"name":"INTERNAL_SERVICE_ERROR","message":"An internal service error has occurred","information_link":"https://developer.paypal.com/docs/api/#INTERNAL_SERVICE_ERROR","debug_id":"fdefbd463f7b7"}
我的Laravel代码如下( PayPal Return )
public function getPaymentStatus()
{
// Get the payment ID before session clear
$payment_id = Session::get('paypal_payment_id');
// clear the session payment ID
//Session::forget('paypal_payment_id');
$payerID = Input::get('PayerID');
$token = Input::get('token');
if(empty($payerID) || empty($token))
{
// Payment Failed....
Flash::error('Payment Failed!');
Redirect::back();
}
$payment = Payment::get($payment_id, $this->_api_context);
// PaymentExecution object includes information necessary
// to execute a PayPal account payment.
// The payer_id is added to the request query parameters
// when the user is redirected from paypal back to your site
$execution = new PaymentExecution();
$execution->setPayerId(Input::get('PayerID'));
//Execute the payment
$result = $payment->execute($execution, $this->_api_context);
echo "Session Data....";
echo "<hr />";
echo "<pre>";
var_dump(Session::all());
echo "</pre>";
echo '<pre>';print_r($result);echo '</pre>';exit; // DEBUG RESULT, remove it later
if ($result->getState() == 'approved')
{
// Payment Made (Now Set Account To Active & Set Users' Options)...
// Also Check Where Referrer Was (If was register - set account up)
dd(Session::all());
}
return Redirect::route('original.route')
->with('error', 'Payment failed');
}
值得指出的是,我正在进行本地安装。这也可能是任何问题?不确定
谢谢!
答案 0 :(得分:1)
此错误消息&#34;找不到或未找到证书颁发机构 - 使用捆绑的CA证书文件重试&#34;表示证书文件问题。请下载最新的证书文件并将其放在密钥库中。请参阅https://www.paypal-knowledge.com/infocenter/index?page=content&widgetview=true&id=FAQ1766&viewlocale=en_US