PayPal IPN: unable to get local issuer certificate PayPal IPN: unable to get local issuer certificate curl curl

PayPal IPN: unable to get local issuer certificate


You're telling cURL to validate the SSL connection but you're not telling it what to validate against;

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);

Make sure you point to an up-to-date list of CA's to trust by adding:

curl_setopt($ch, CURLOPT_CAPATH, "./cacert.pem");

If you don't have an up-to-date cacert list yourself, I'd recommend downloading the one supplied by the cURL maintainer: cacert.pem.


You want CURLOPT_CAINFO (points to a PEM file) not CURLOPT_CAPATH (which points to a directory containing PEM files).

curl_setopt($ch, CURLOPT_CAINFO, "./cacert.pem");