Good morning all,
I am working on setting up a google recaptcha v3 on our site. I am passing the token to a landing page (and it's showing up in the output; however, I need to append this token to a URL request. When I do a simple concatenation, the secret key shows up - but the token does not. Additionally, when I output the full URL (see below) it results in '0'. Is this an issue of needing to urlencode the token? Has anyone successfully used v3 of recaptcha?
I am working on setting up a google recaptcha v3 on our site. I am passing the token to a landing page (and it's showing up in the output; however, I need to append this token to a URL request. When I do a simple concatenation, the secret key shows up - but the token does not. Additionally, when I output the full URL (see below) it results in '0'. Is this an issue of needing to urlencode the token? Has anyone successfully used v3 of recaptcha?
Code:
Recaptcha token passed = &mvta:global:g-recaptcha-response; <br>
<mvt:assign name="g.recaptcha_url" value="'https://www.google.com/recaptcha/api/siteverify?secret=[mySecret]&response='"/>
<mvt:assign name="g.newrecaptcha_url" value="g.recaptcha_url $ g.g-recaptcha-response"/>
<br><br>
The recaptcha URL is: &mvt:global:recaptcha_url; <br><br>
The NEW recaptcha URL is: &mvt:global:newrecaptcha_url; <br><br>
<mvt:call action="g.newrecaptcha_url" method="'RAW'" content-type="'application/json'">
<mvt:assign name="l.settings:jsonRecapcha" value="l.settings:json $ s.callvalue" />
jsonRecapcha = &mvt:jsonRecapcha;<br>
</mvt:call>
Comment