Played around a bit with v2 of recaptcha.
One big thing to note is they took away global keys. You now have to list each domain so that sucks. Did find a workaround though you have to create a secure token.
Here is a the lib samples with ReCaptchaToken.php included.
I did something like this on my sites
global $sourcedir;
require("$sourcedir/ralib/ReCaptchaToken.php");
$reconfig = array('site_key' => $modSettings['recaptcha_public_key'], 'site_secret' => $modSettings['recaptcha_private_key']);
$recaptchaToken = new \ReCaptchaSecureToken\ReCaptchaToken($reconfig);
$secureToken = $recaptchaToken->secureToken($context['session_id']);
echo ' <div class="g-recaptcha" data-sitekey="', $modSettings['recaptcha_public_key'], '" data-stoken="' . $secureToken . '"></div>
<script type="text/javascript"
src="https://www.google.com/recaptcha/api.js?hl=en">
</script>
register.php
require("$sourcedir/ralib/autoload.php");
// Check whether the visual verification code was entered correctly.
if(!empty($modSettings['recaptcha_enable']) || ($modSettings['recaptcha_enabled'] == 1 && !empty($modSettings['recaptcha_public_key']) && !empty($modSettings['recaptcha_private_key'])))
{
if (isset($_POST['g-recaptcha-response']))
{
$recaptcha = new \ReCaptcha\ReCaptcha($modSettings['recaptcha_private_key']);
$resp = $recaptcha->verify($_POST['g-recaptcha-response'], $_SERVER['REMOTE_ADDR']);
if ($resp->isSuccess() == false)
{
fatal_lang_error('visual_verification_failed', false);
}
}
else
fatal_lang_error('visual_verification_failed', false);
}