Reputation: 145
use Illuminate\Support\Facades\Http;
$response = Http::asForm()->post('https://www.google.com/recaptcha/api/siteverify', [
'secret' => '6LftPCIdAAAAAPD5Md-fahgg3sj0SCUhV9qC5e9B',
'response' => request('Response')
])->json();
return $response;
The error i get is:
GuzzleHttp\Exception\RequestException: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://www.google.com/recaptcha/api/siteverify in file D:\CODE\flowlence-api\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 211
I have tried to do this but it didn't work cURL error 60: SSL certificate in Laravel 5.4
And I dont have xampp or wamp.
Thanks.
Upvotes: 1
Views: 486
Reputation: 145
I have solved it. Since I don't use Xampp or Wamp i went to PHP\v7.4\extras\ssl and there I have pasted cacert.pem
And in php.ini I have found curl.cainfo = C:\Program Files (x86)\PHP\v7.4\extras\ssl\cacert.pem and i uncommented it by removing ;
restarted local host and it works.
Upvotes: 1