Enable local SSL certificate verification (#356)

This fixes points being not delivered on same systems.

Also set the CURLOPT_SSLVERSION as stated here https://www.php.net/manual/de/function.curl-setopt.php#118536
This commit is contained in:
slawkens 2019-04-13 01:06:46 +02:00 committed by Stefan A. Brannfjell
parent f5bbc78101
commit c0fe9e5d85
2 changed files with 3405 additions and 2 deletions

3401
engine/cert/cacert.pem Normal file

File diff suppressed because it is too large Load Diff

View File

@ -25,8 +25,10 @@
$IPN['cmd'] = '_notify-validate';
$PaypalHost = (empty($IPN['test_ipn']) ? 'www' : 'www.sandbox').'.paypal.com';
$cURL = curl_init();
//curl_setopt($cURL, CURLOPT_SSL_VERIFYPEER, false);
//curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($cURL, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($cURL, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($cURL, CURLOPT_SSLVERSION, 6);
curl_setopt($cURL, CURLOPT_CAINFO, __DIR__ . '/engine/cert/cacert.pem');
curl_setopt($cURL, CURLOPT_URL, "https://{$PaypalHost}/cgi-bin/webscr");
curl_setopt($cURL, CURLOPT_ENCODING, 'gzip');
curl_setopt($cURL, CURLOPT_BINARYTRANSFER, true);