AbanteCart Community

Shopping Cart Operations => Support => Template Support => Topic started by: HADY on August 03, 2019, 06:01:19 AM

Title: reCAPTCHA V2 & reCAPTCHA V3
Post by: HADY on August 03, 2019, 06:01:19 AM
Hello Community!

I am Wondering if we can use both V2 and V3 on website. If yes, let me know how to proceed please.

Thanks Alot


Regards
HADY
 
Title: Re: reCAPTCHA V2 & reCAPTCHA V3
Post by: Basara on August 05, 2019, 02:29:05 AM
I think you can not use both. This may cause conflict
Title: Re: reCAPTCHA V2 & reCAPTCHA V3
Post by: HADY on August 05, 2019, 04:38:41 AM
I think you can not use both. This may cause conflict

Thank you Sir!

Actually I added next code to each layout on website:

<!DOCTYPE html>
<html>
<body>

  <script src="https://www.google.com/recaptcha/api.js?render=website-key"></script>
  <script>
  grecaptcha.ready(function() {
      grecaptcha.execute('website-key', {action: 'homepage'}).then(function(token) {
         ...
      });
  });
  </script>
 
</body>
</html>


my website including now v2 & v3 but i don't know if they are working together yet. I still have a question about secret key where should be added ?

maybe you have an answer for that ??

Regards
Title: Re: reCAPTCHA V2 & reCAPTCHA V3
Post by: HADY on August 16, 2019, 08:18:27 AM
Hi Community!

To activate v2 & v3 on website, follow the steps on activating v2 as usually on Abantecart Admin dashboard, create a new html block give it any name and add the reCAPTCHA code. Don't forget to add the website key which given to you on  reCAPTCHA website in the required places in the code and then go your website layouts and add the block where ever you want.


<!DOCTYPE html>
<html>
<body>

  <script src="https://www.google.com/recaptcha/api.js?render=insert-website-key-here"></script>
  <script>
  grecaptcha.ready(function() {
      grecaptcha.execute('insert website key here', {action: 'homepage'}).then(function(token) {
         ...
      });
  });
  </script>
 
</body>
</html>

This topic will be closed for your attention.
 
Regards