Created : 02 March 2018
Last Modified : 21 March 2018
***********************************************************************************
Contents:
A. SUMMARY
B. FILE STRUCTURE
C. INSTALLATION INSTRUCTION
D. HOW IT WORKS
E. FILE NEED TO BE MODIFIED
F. CONFIGURATION SETTINGS
G. DATABASE TABLES MODIFIED
H. LANGUAGE SETTINGS CHANGED
I. CHANGE LOGS
J. TROUBLESHOOTING
K. COPYRIGHT NOTICE
L. TERMS AND CONDITIONS
***********************************************************************************
A. SUMMARY
==========
This patch will replace v8 existing Google reCAPTCHA v1 with reCAPTCHA v2.
reCAPTCHA v1 API will not work after March 31, 2018.
If your V8 site still uses reCAPTCHA v1, please upgrade to reCAPTCHA v2 immediately by following the steps mentioned below.
NOTE :
This patch is only for V8.1.0.15 and earlier v8 versions.
V8.1.0.16 and above no need this patch as reCAPTCHA v2 already included by default.
Also, since this reCAPTCHA v2 will communicate using XML and it will need your VPCart site to be TLS 1.2 compatible.
For older v8.1.0.2 and below if you have not patched yet with TLS 1.2 then you must follow the below helpnote to patch your v8 site to be TLS 1.2 first:
https://helpnotes.vpcart.com/kb/71-Add-Ons/1200-TLS-12-Update/
***********************************************************************************
B. FILE STRUCTURE
===================
Files included in the zip are:
- $READ_ME_FIRST_recaptchav2_v8patch.HTML
- shop_captcha_subs.asp
- admin\recaptchav2_v8patch_setup.asp
- admin\recaptchav2_v8patch_setup_config.asp
- admin\recaptchav2_v8patch_setup_process.asp
- admin\sqlscripts\recaptchav2_v8patch\*
***********************************************************************************
C. INSTALLATION INSTRUCTION
============================
1. Upload below file(s) to VPCart root folder.
- shop_captcha_subs.asp
1.1. Upload below file(s) to your ADMIN folder. If you have renamed your ADMIN folder, then this must be placed in the renamed folder.
- admin\recaptchav2_v8patch_setup.asp
- admin\recaptchav2_v8patch_setup_config.asp
- admin\recaptchav2_v8patch_setup_process.asp
- admin\sqlscripts\recaptchav2_v8patch\*
2. You will need to modify some of the v8 core files.
2.1 Open the file shopcaptchaxmlhttp.asp with your favorite editor and
2.2. Insert below code into the first line of the file:
<!-- #include file="shopxmlhttp.asp" -->
2.3. Locate below line, estimate line 11,
sub Captchaxmlhttp (itype, iurl, indata, outdata, method, xmlerror)
2.4. Below that code, please insert : dim rheadercnt, rheadertypeary(10), rheadervalueary(10)
rheadercnt = 1
rheadertypeary(0) = "Content-Type"
rheadervalueary(0) = "application/x-www-form-urlencoded"
on error resume next
Shopxmlhttp_v8 "auto", iurl, indata, outdata, method, xmlerror, rheadercnt, rheadertypeary, rheadervalueary, "", ""
if err.number = 0 then
exit sub
end if
on error goto 0
2.5. Save the file
2.6 Open the file shop$db.asp with your favorite editor and
2.7. Locate below line, estimate line 4039,
sub GetCAPTCHA
2.8. Please replace with:sub GetCAPTCHA_old
2.9. Locate below line, estimate line 4052,
function recaptcha_challenge_writer
2.10. Please replace with:function recaptcha_challenge_writer_old
2.11. Locate below line, estimate line 4068,
function recaptcha_confirm(rechallenge,reresponse)
2.12. Please replace with:function recaptcha_confirm_old
2.13. Locate below lines and REMOVE them, estimate line 4037-4038,
Const recaptcha_public = "6LfEAAYAAAAAAE4q6xRo7KgZdF5NDqxgmA85U-LR"
Const recaptcha_private = "6LfEAAYAAAAAAFhBfWDIxh3-jVVRTlVTH2vk17bN"
2.14. Save the file
2.15 Open the file shopmodules_include.asp with your favorite editor and
2.16. Insert the code below into very last line of the file, estimate line 64,
<!-- #include file="shop_captcha_subs.asp" -->
2.17. Save the file
2.18 Open the file shop_load_otherjs_subs.asp with your favorite editor and
2.19. Locate the code below, estimate line 69,
on error goto 0
2.20. BEFORE that code, please insert :
load_recaptchav2_js
2.21. Save the file
2.22.
Open the file shoptellfriendpro.asp with your favorite editor and
2.23. Locate the code below, estimate line 107,
CreatetellafriendCAPTCHA
2.24. Please replace with:
CreateCAPTCHA
2.25. Locate the code below, estimate line 357-363,
sub tellfriendtrailer
%>
</div>
</body>
</html>
<%
end sub
2.26. Please replace with:
sub tellfriendtrailer
%>
</div>
<%
'800 - 2018.03.07 - Bug Fix: Tell friend and Review: Recaptcha v2 does not working properly
load_others_js
%>
</body>
</html>
<%
end sub
2.27. Locate the code below at the very bottom of the file,
%>
2.28. BEFORE it, please insert this new code:
'800 - 2018.03.07 - Bug Fix: Tell friend and Review: Recaptcha v2 does not working properly
sub CreateCAPTCHA
if GetConfig("xprotectemailforms") <> "Yes" then exit sub
htmlwrite "<div class=""row"">"
htmlwrite "<div class=""col-sm-5"">"
htmlwrite "<label>"& GetLang("langcaptchalabel") &"</label>"
htmlwrite "</div>"
htmlwrite "<div class=""col-sm-7"">"
htmlwrite "<div class=""captcha_wrapper"">"
htmlwrite "*" & GetLang("langcaptchaenter")
GetCAPTCHA
htmlwrite "</div>"
htmlwrite "</div>"
htmlwrite "<div class=""cb""></div>"
htmlwrite "</div>"
end sub
2.29. Save the file
2.30.
Open the file shopreviewspro.asp with your favorite editor and
2.31. Locate the code below, estimate line 255,
CreateproreviewsCAPTCHA
2.32. Please replace with:
CreateCAPTCHA
2.33. Locate the code below, estimate line 521-527,
sub reviewpagetrailer
%>
</div>
</body>
</html>
<%
end sub
2.34. Please replace with:
sub reviewpagetrailer
%>
</div>
<%
'800 - 2018.03.07 - Bug Fix: Tell friend and Review: Recaptcha v2 does not working properly
load_others_js
%>
</body>
</html>
<%
end sub
2.35. Locate the code below at the very bottom of the file,
%>
2.36. Before it, please insert this new code:
'800 - 2018.03.07 - Bug Fix: Tell friend and Review: Recaptcha v2 does not working properly
sub CreateCAPTCHA
if GetConfig("xprotectemailforms") <> "Yes" then exit sub
htmlwrite "<div class=""row"">"
htmlwrite "<div class=""col-sm-5"">"
htmlwrite "<label>"& GetLang("langcaptchalabel") &"</label>"
htmlwrite "</div>"
htmlwrite "<div class=""col-sm-7"">"
htmlwrite "<div class=""captcha_wrapper"">"
htmlwrite "*" & GetLang("langcaptchaenter")
GetCAPTCHA
htmlwrite "</div>"
htmlwrite "</div>"
htmlwrite "<div class=""cb""></div>"
htmlwrite "</div>"
end sub
2.37. Save the file
2.38.
Open the file shoptellafriend.asp with your favorite editor and
2.39. Locate the code below, estimate line 101,
'800 - 2017.05.18 - Tell a friend: Not working properly if directly access the page shoptellafriend.asp
2.40. If your file has the above code, then no need further change and you can ignore this step and go to step 3.
However, if your file does not have the above code, then please do the change below:
Locate the code below, estimate line 100-102,
htmlwrite "<div class=""std_table"">"
htmlwrite "<table border=""0"" cellpadding=""3"" cellspacing=""3"" align=""center"">"
htmlwrite "<form name=""form1"" method=""post"" action=""shoptellafriend.asp?id="& id &""">"
2.41. Please replace with:
htmlwrite "<form name=""form1"" method=""post"" action=""shoptellafriend.asp?id="& id &""">"
htmlwrite "<div class=""std_table"">"
htmlwrite "<table border=""0"" cellpadding=""3"" cellspacing=""3"" align=""center"">"
2.42. Save the file.
3. Upload all amended files above to your server.
4. Log into super admin and execute page below:
http://www.yourdomain.com/<your admin folder>/recaptchav2_v8patch_setup.asp
Note: Replace url section with your v8 site url values:
{ www.yourdomain.com } : your site domain
{ your admin folder } : your admin folder
Click Install Now button.
5. If installation completed, you should see :
_______________________________________________________
The Recaptcha V2 Patch for V8 initial setup has now been completed.
Please click this link for further setup.
Please click here to configure the related settings for further setup.
_______________________________________________________
The first link will take you to the User Guide on how to obtain reCAPTCHA Secret key and Site key from Google reCAPTCHA administration:
https://helpnotes.vpcart.com/userguide900/#!Documents/mailformprotection.htm
The second link will take you to the admin configuration page to setup reCAPTCHA:
xcaptchamethod : Please set this to : recaptchav2
: Enter your reCAPTCHA v2 Secret Key
: Enter your reCAPTCHA v2 site Key
Please refer to the User Guide link above on how to obtain xrecaptchav2_secretkey and xrecaptchav2_sitekey from Google reCAPTCHA administration.
***********************************************************************************
D. HOW IT WORKS
===============
When xcaptchamethod has been set to use recaptchav2, and both xrecaptchav2_secretkey and
are entered correctly, when in the mailing form that have security protection for spamming eg shopcustcontact.asp it will show the new reCAPTCHA v2 protection form as shown in below :
Your customers will need to tick/check that checkbox to proof they are not robots before they can submit the form.
***********************************************************************************
E. FILE NEED TO BE MODIFIED
=================
- shopcaptchaxmlhttp.asp
- shop$db.asp
- shopmodules_include.asp
- shop_load_otherjs_subs.asp
- shoptellfriendpro.asp
- shopreviewspro.asp
F. CONFIGURATION SETTINGS
=================
New configs :
G. DATABASE TABLES MODIFIED
===========================
NONE
NONE
NONE
1. Why did the reCAPTCHA v2 not working?
Please make sure you've entered the correct xrecaptchav2_secretkey and xrecaptchav2_sitekey in your v8 config administration.
Please refer to https://helpnotes.vpcart.com/userguide900/#!Documents/mailformprotection.htm
2. reCAPTCHA v2 module still does not work !
Please submit a ticket to our helpdesk at https://helpdesk.vpcart.com and our support team will assist you.