0

I am using prestapaypalplugin form http://www.symfony-project.org/plugins/prestaPaypalPlugin. I had prepare action file as give in redme.txt file. but I got this error "curl_exec error 60 Peer's Certificate issuer is not recognized". with both direct payment and express checkout method. I tried website payment, It's work fine.

Thanks.

herr
  • 837
  • 1
  • 8
  • 21
  • @Joshua Coady & kodmanyagha, Thanks for help. But I moved to Symfony2 and no more requirement for this plugin. Sorry, now I can't try your solutions so I can't accept any answer as correct. Thanks for help. I will not close this topic, as it may help to another users. – herr Nov 22 '16 at 11:14

2 Answers2

2

It seems a CA certificate problem. May be this post helps to you:

HTTPS and SSL3_GET_SERVER_CERTIFICATE:certificate verify failed, CA is OK

Community
  • 1
  • 1
kodmanyagha
  • 932
  • 12
  • 20
  • I had use from http://stackoverflow.com/questions/14951802/ssl-certificate-issue-unable-to-get-local-issuer-certificate-on-payapl-ipn-veri then i got this error "curl_exec error 35 NSS: client certificate not found (nickname not specified)" – herr May 09 '13 at 10:45
1
  1. Download https://curl.haxx.se/ca/cacert.pem
  2. Rename it api_cert_chain.crt
  3. Copy to PROJECTDIR/plugins/prestaPaypalPlugin/sdk/lib/PayPal/cert/ (overwriting the existing file with the same name)

Alternately, you could do it in your code. Download cacert.pem and directly set the path to it in the code. Something like this:

$caller =& PayPal::getCallerServices($profile);
$caller->setOpt('curl', CURLOPT_CAINFO, '/PATH/TO/cacert.pem');

Note that you cannot fix by updating the path in php.ini because presta overrides the php.ini default with PROJECTDIR/plugins/prestaPaypalPlugin/sdk/lib/PayPal/cert/api_cert_chain.crt in PROJECTDIR/plugins/prestaPaypalPlugin/sdk/lib/PayPal/CallerServices.php:

function CallerServices($profile)
{
  ...
  $this->setOpt('curl', CURLOPT_CAINFO, dirname(__FILE__) . '/cert/api_cert_chain.crt');
Josh Coady
  • 2,089
  • 2
  • 18
  • 25