Curl Error : SSL certificate problem: unable to get local issuer certificate Laravel Wamp

Got this error when trying to use a Laravel API package that used Curl:

Curl Error : SSL certificate problem: unable to get local issuer certificate

I am using WAMP (local development) so the solution that worked was this (Let’s assume your PHP version is 7.1.9):

1. Download/save this file: http://curl.haxx.se/ca/cacert.pem into (your wamp path might differ) the C:\wamp64\bin\php\php7.1.9 folder.

2. Now you have to edit php.ini file but in my case it was not the one that is in the above folder (I tried that one first but still got the same error) but it was the one in this (your wamp and apache folder might differ) folder:  C:\wamp64\bin\apache\apache2.4.27\bin . The easiest way to open this file is to click on the green W (Wamp) icon in the tray, then PHP and then php.ini and Windows should open this file for you.

3. Find this line
;curl.cainfo
and change it to :
curl.cainfo = "C:\wamp614\bin\php\php7.1.9\cacert.pem"
Dont forget to remove the ; at the start of the line and of course use your wamp path.

4. Restart (or exit and start) the WAMP server and the error should be gone!