I wanna add ReCaptcha version 2 from Google to ZfcUser RegisterForm. I did as mentioned in Zend Framework 2: How to properly replace Figlet with reCaptcha on zfcUser and it works fine.
Then I added recaptcha of version 2 trough composer:
"browserlife/zf2-recaptcha" : "dev-master"
Then I changed my zfcuser.global.php
'form_captcha_options' => array(
'class' => 'BrlReCaptcha\ReCaptcha'
'options' => array(
'expiration'=> 300,
'timeout' => 300,
'theme' => 'dark',
),
),
So, I get the correct register form on my page. The captcha (version 2) provides validation and successfully passes it. But from the server side I get the error that captcha element was is empty.
The difference is that these elements (v1 and v2) send various parameters for verification:
recaptcha v1 sends this params to server for processing:
captcha[recaptcha_challenge_field]
captcha[recaptcha_response_field]
recaptcha_challenge_field
recaptcha_response_field
recaptcha v2 sends this params to server for processing:
g-recaptcha-response
Who knows how to be? Perhaps there is another solution for integration the ReCaptcha v2 by Google.