Created
April 19, 2018 17:40
-
-
Save gustavoreis/e3de7cba7b8e73855d41524cbf391085 to your computer and use it in GitHub Desktop.
Invisible reCAPTCHA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://www.google.com/recaptcha/api.js" async defer></script> | |
<script> | |
var element = document.getElementById("payment_card_confirm"); | |
element.classList.add("g-recaptcha"); | |
element.dataset.sitekey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; | |
element.dataset.callback = "onSubmitCaptcha"; | |
function onSubmitCaptcha(token) { | |
document.getElementById("payment_form").submit(); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment