I use Joomla 3.4.1 and Recaptcha v 2.0. I can't validate the captcha, i'm sure i've the good PHP code..
This is the code in plugin file, recaptcha.php :
function onCheckAnswer($code = null)[...]
case '2.0':
// Challenge Not needed in 2.0 but needed for getResponse call
$challenge = null;
$response = $input->get('g-recaptcha-response', '', 'string');
echo "response :<br>";
var_dump($response);
$spam = ($response == null || strlen($response) == 0);
echo "spam :<br>";
var_dump($spam);
break;
PHP code in my controller :
JPluginHelper::importPlugin('captcha');
$dispatcher = JDispatcher::getInstance();
$return = $dispatcher->trigger('onCheckAnswer');
echo "return :<br>";
var_dump($return[0]);
What this return :
response : string(0) ""
spam : bool(true)
return : bool(false)
I don't understand, someone can help me please ?
Thanks ;)