Solved
google reCapthca v2
Hello, I have a problem to verify my captcha request. I use local host and i get this error:
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
Here is the code and request('Response') is a string.
namespace App\Http\Controllers;
use Illuminate\Http\Request; use Illuminate\Support\Facades\Http; class ReCaptchaController extends Controller{ //
public function index(Request $request){
$response = Http::asForm()->post('https://www.google.com/recaptcha/api/siteverify', [
'secret' => '6LftPCIdAAAAAPD5Md-fahgg3sj0SCUhV9qC5e9B',
'response' => request('Response')
])->json();
return $response;
}
}
Thanks.
Please or to participate in this conversation.