Subject: | reCAPTCHA v2 required |
Hello,
this module is out of order, because google don't support version 1 anymore. But the good news: v2 is most compatible.
There are only 2 small changes needed:
diff --git a/dist.ini b/dist.ini
index 72d3d5f..b7a2be5 100644
--- a/dist.ini
+++ b/dist.ini
@@ -7,7 +7,7 @@ copyright_year = 2013
version = 1.00
[Prereqs]
-Captcha::reCAPTCHA = 0.93
+Captcha::reCAPTCHA = 0.98
Clone = 0.31
HTML::FormFu = 1.00
Moose = 1.00
diff --git a/lib/HTML/FormFu/Constraint/reCAPTCHA.pm b/lib/HTML/FormFu/Constraint/reCAPTCHA.pm
index 6ec095c..8c92058 100644
--- a/lib/HTML/FormFu/Constraint/reCAPTCHA.pm
+++ b/lib/HTML/FormFu/Constraint/reCAPTCHA.pm
@@ -57,7 +57,7 @@ sub process {
: $ENV{REMOTE_ADDR};
my $result
- = $captcha->check_answer( $privkey, $remoteip, $challenge, $response, );
+ = $captcha->check_answer_v2( $privkey, $remoteip, $challenge, $response, );
# they're human!
if ( $result->{is_valid} ) {
diff --git a/lib/HTML/FormFu/Element/reCAPTCHA.pm b/lib/HTML/FormFu/Element/reCAPTCHA.pm
index 0a488d1..2a9cf62 100644
--- a/lib/HTML/FormFu/Element/reCAPTCHA.pm
+++ b/lib/HTML/FormFu/Element/reCAPTCHA.pm
@@ -80,7 +80,7 @@ sub render_data_non_recursive {
my $recaptcha = Captcha::reCAPTCHA->new;
my $recaptcha_html
- = $recaptcha->get_html( $pubkey, $error, $use_ssl, $recaptcha_options,
+ = $recaptcha->get_html_v2( $pubkey, $error, $use_ssl, $recaptcha_options,
);
my $render = $self->SUPER::render_data_non_recursive( {