diff --git a/Helper/Data.php b/Helper/Data.php index e9a44b0..e5b233a 100644 --- a/Helper/Data.php +++ b/Helper/Data.php @@ -323,7 +323,10 @@ public function verifyResponse($end = null, $recaptcha = null) return $result; } try { - $recaptchaClass = new ReCaptcha($end === 'visible' ? $this->getVisibleSecretKey() : $this->getInvisibleSecretKey()); + $recaptchaClass = new ReCaptcha( + $end === 'visible' ? $this->getVisibleSecretKey() : $this->getInvisibleSecretKey(), + function_exists('curl_init') ? new \ReCaptcha\RequestMethod\CurlPost() : null + ); $resp = $recaptchaClass->verify($recaptcha, $this->_request->getClientIp()); if ($resp && $resp->isSuccess()) { $result['success'] = true;