Mike521w I just stumbled upon this thread and was thinking I could try to use your module to help protect our cart from protecting our site fraudulent bot "carding" by trying to prevent them from even adding something to the cart.
Already have reCaptcha v3 set up and installed your module using ADPR in the action list and 0.3 as the tolerance level.
On the PROD page I added this inside the add to cart form:
And this directly after the form element:
It works great as long as the customer adds a product to the cart before the token expires which I believe is 2 minutes.
I would assume a fix for that would be to run the recaptcha function with on submit or on click.
But it gets tricky (for me at least). Since this form uses an ajax add to cart function I also need it to run the recaptcha function again so a new token is given on the next attempt to add the same product to the cart again.
I can send the ajax code privately since it will not let me post here.
Any help would be greatly appreciated.
Not opposed to hiring someone to help with this either.
Already have reCaptcha v3 set up and installed your module using ADPR in the action list and 0.3 as the tolerance level.
On the PROD page I added this inside the add to cart form:
Code:
<input type="hidden" name="GoogleReCaptchaResponse" value="">
Code:
[script src="https://www.google.com/recaptcha/api.js?render=our_site_key"][/script] [script] grecaptcha.ready(function() { grecaptcha.execute('our_site_key', {action: 'Add2Cart'}).then(function(token) { jQuery("#js-purchase-product input[name='GoogleReCaptchaResponse']").val(token); }); }); [/script]
I would assume a fix for that would be to run the recaptcha function with on submit or on click.
But it gets tricky (for me at least). Since this form uses an ajax add to cart function I also need it to run the recaptcha function again so a new token is given on the next attempt to add the same product to the cart again.
I can send the ajax code privately since it will not let me post here.
Any help would be greatly appreciated.
Not opposed to hiring someone to help with this either.
Comment