Recaptchav2 Invisible Error

Maybe to test what is going on, you could change this line in the snippet recaptchav2

to $modx->log(modX::LOG_LEVEL_ERROR, print_r($resp, true)); (or change the log_level in the system settings) to see the return of the verification in the error log.

You could also log the value of “g-recaptcha-response” to check that it is not empty.

$modx->log(modX::LOG_LEVEL_ERROR, 'g-recaptcha-response=' . $hook->getValue('g-recaptcha-response'));
1 Like