I’m trying to integrate reCaptcha v 3 into our checkout page. It seems that no matter what I do the call to grecaptcha.enterprise.execute is always returning a token of 0.
Here is the button event:
function OnCCCard(e) {
e.preventDefault();
grecaptcha.enterprise.ready(async () => {
console.log('Getting Token');
const token = await grecaptcha.enterprise.execute('MyKey', { action: 'checkout' });
console.log('Got Token:' & token);
});
}
No matter what I try the second console.Log always says : “Got Token: 0”
I’m not sure what I’m doing wrong.