First you have to download the certificate from this link
https://curl.haxx.se/ca/cacert.pem
and put it in a location you want the name of downloadable file is : cacert.pem So in my case I will put it under C:\wamp64\bin\php\cacert.pem
Then you have to specify the location of the php.ini file
For example, I am using php 7 the php.ini file is located at : C:\wamp64\bin\php\php7.0.10\php.ini
So access to that file and uncommit this line ;openssl.cafile
also update it to be looks like this openssl.cafile="C:\wamp64\bin\php\cacert.pem"
Finally restart your apache server and that's all