sh0umik / Laravel5-PaypalIPN

Paypal IPN Package for Laravel 5
34 stars 22 forks source link

cURL error: (60) ... certificate not valid #13

Open stefanocurnis opened 5 years ago

stefanocurnis commented 5 years ago

Hey guys. I suddenly get this in my IPN responses:

cURL error: [60] SSL certificate problem: unable to get local issuer certificate.

Anyone else? I never seen it before. Probably outdated certificate file? Thanks

helderferrari2 commented 4 years ago

Same error here... any solution?

ultrono commented 4 years ago

@helderferrari2 @stefanocurnis Yep, have suddenly started to get this myself recently too. Nothing has changed on the server.

I resolved this by saving https://curl.haxx.se/ca/cacert.pem into the src/cert directory.

I then replaced https://github.com/sh0umik/Laravel5-PaypalIPN/blob/master/src/PaypalIPNListener.php#L106 with

dirname(__FILE__)."/cert/cacert.pem");

I'm unsure why this worked :/

Above works in the Sandbox and live environments.

ultrono commented 4 years ago

FYI the offical PayPal IPN examples on Github (see https://github.com/paypal/ipn-code-samples/blob/master/php/PaypalIPN.php) use the cacert.pem I mentioned above and differrent endpoints. IT may be wise to use that instead of this class.

8ctopus commented 1 year ago

16