Jump to content

recapcha ending


keat

Recommended Posts

It seems that recapcha V1 is ending on the 31st of March.

My cart has 2 options, Recapcha and New Recapture, but Google has 3 different options.

V2, Invisible and Android.

Only Recapcha seems to work.

As my sites have lots of mods, I can't really go down the route up upgrading.

Any pointers to get Recapcha 2 working ?

 

 

Link to comment
Share on other sites

Relevant GitHub issue: https://github.com/cubecart/v6/issues/1883

In more recent CubeCart versions the naming convention should match Google.

Android I expect is for mobile apps. You can get the latest reCaptcha V2 working following these steps:

1. Overwrite/add the following files to your current skin:
https://github.com/cubecart/v6/blob/6.2.0-branch/skins/foundation/templates/content.recaptcha.head.php
https://github.com/cubecart/v6/blob/6.2.0-branch/skins/foundation/templates/content.recaptcha.php

2. Add this line of code to the head of main.php & main.checkout.php (if that exists) file(s):
https://github.com/cubecart/v6/blob/6.2.0-branch/skins/foundation/templates/main.php#L20 

Link to comment
Share on other sites

I applied the new Korouto skin to my test site and it appears to work.

Is it the same 4 files as listed above which have changed or new, as my skin is also modified, so I'll need to apply changes to it.

 

Link to comment
Share on other sites

  • 2 weeks later...

I modified my Mican skin on my main site, and this is working.

I copied this modified skin to one of my lesser sites, but this one doesn't work.

I'm seeing 'verification code incorret' message.

Despite me deleting and creating a new key.

 

Any ideas where to look.

Link to comment
Share on other sites

I found that at least 4 out 8 site are not working, so I've disabled them for now.

I need to investigate this methodically and start taking notes.

I'm 99% certain that one of my major sites was working fine last week, and wasn't today.

Link to comment
Share on other sites

I'm flummoxed.

 

This is what happens when trying to register as a new customer.

I go through ticking the recapture checkbox, a popup appears asking me to verfiy some images.

verify images, a green tick appears, as if Recapture was verified.

I click the register button, at which point cubecart pops up the message about verfication codes being incorrect.

 

 

The following errors were detected:

  • The verification code was incorrect. Please try again.

 

 

Link to comment
Share on other sites

In GUI->recaptchaValidate(), if there is a value passed by POST for 'g-recaptcha-response' (assuming the reCaptcha javascript creates the form element and populates it with the response value), the code here sends the secret key, the response, and the visitor's IP address to Google siteverify page via CubeCart's Request functionality. This is for reCaptcha V2 and Invisible.

As such, the Request and Google's Response is logged in Cubecart's admin Request Log.

If you are using reCaptcha V1, we will have to capture Google's response by some other means.

Link to comment
Share on other sites

Depending on which version of Cubecart is installed, I'm trying to use 'New Recapture' or 'Recapture V2'

I don't see anything in request log.

Are there any files other than skin files ?

I have one site using Karouto which works, and another site using the exact same skin files which doesn't.

Link to comment
Share on other sites

What version of CubeCart has "New Recaptcha"?

Select "New Recaptcha". This probably V1 (<select><option value = "1">)

On a View Product page, click the "Write Review" link. Have your web browser show you the DOM (aka HTML source after javascript has finished modifying it). Firefox's Developer Tools, Inspector will do this.

Find the form element:

<input name="recaptcha_response_field" ...

This is reCaptcha V1 text entry field where you type in what you see as the words in the images.

Sometimes you will get this image to interpret: www.gstatic.com/recaptcha/images/v1_unsupported.png

In /classes/gui.class.php, near line 768, find:

require_once CC_INCLUDES_DIR.'lib/recaptcha/recaptchalib.php';
$resp = recaptcha_check_answer($this->_reCAPTCHA_keys['captcha_private'], $_SERVER['REMOTE_ADDR'], $_POST['recaptcha_challenge_field'], $_POST['recaptcha_response_field']);

On a new blank line after this, add:

$GLOBALS['debug']->errorLogger(E_USER_NOTICE, print_r($resp,TRUE),__FILE__,__LINE__);

In admin, Store Settings, Advanced tab, enable Debug mode. Enter your IP address in the adjacent field (www.whatismyip.com).

On the View Product page, enter a review (you can delete it easily). Click Submit Review.

In admin, Error Log, System Error Log tab, you should find the response from Google when CubeCart makes the reCaptcha verification.

You can try this alternate edit:

In /includes/lib/recaptcha/recaptchalib.php, near line 74:

Find:

$request->skiplog(true);

Change to:

$request->skiplog(false);

ReCaptcha V1 verification responses should now get logged in the Request Log.

Link to comment
Share on other sites

The site i've been playing with all night has V1 and V2 listed in the recapture setting.

 

I've sent debug via PM as it contains the key and response codes etc.

 

 

 

 

Link to comment
Share on other sites

In the logs I sent BSmither, I notice url_fopen is configured to Off.

in PHP.ini, I changed this to On and now the sites are working.

What's strange though, is all sites use the same version on PHP (7.0), on the same server, so why did 3 of the sites  work and 5 didn't.

Link to comment
Share on other sites

  • 5 weeks later...

Feedback - Worked fine for me thanks :)
Using Kurouto skin on CubeCart V6.11.4, I downloaded the new 1.0.3 skin linked to above,
then only copied over the 3 files as my skin is modified ...

 Overwrite/add the following files to your current skin:
/skins/kurouta/templates/content.recaptcha.head.php
/skins/kurouta/templates/content.recaptcha.php
/skins/kurouta/templates/main.php

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...