Announcement

Collapse
No announcement yet.

Adding reCAPTCHA V2 to checkout (How to validate form input during checkout?)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Adding reCAPTCHA V2 to checkout (How to validate form input during checkout?)

    The new V2 of Google's reCAPTCHA is pretty slick, and a lot more user-friendly, so I'd like to implement it in our store. We have been using the "Checkout reCAPTCHA" module, but it doesn't use the new V2 code, and the Miva folks tell me they have no plans to add it. They also suggested that I could implement V2 manually, rather than use the manual, but they couldn't say how.

    I've implemented the V2 reCAPCHA manually numerous times myself in non-store related PHP files, so I know how it works in general. Doing it in Miva has me stumped, though. I can get the captcha element to display during checkout, but I can't figure out where to add the logic to verify that the entered code matched. I basically need to intercept the submission of the form and validate the inputs before continuing, and I'm not sure how to do that.

    Any suggestions would be greatly appreciated!

    #2
    Re: Adding reCAPTCHA V2 to checkout (How to validate form input during checkout?)

    You're going to need to modify the form and add some JavaScript to submit it. You'll first need to submit the recaptcha and look at its response to then determine if the regular Miva form can be submitted.

    I'll see if I can get you some code samples.
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      Did you ever figure it out? If so, can you please post solution?
      Thank you, Bill Davis

      Comment


        #4
        This is a really old thread, I believe our newer built in reCaptcha is on V2.
        Thanks,

        Rick Wilson
        CEO
        Miva, Inc.
        [email protected]
        https://www.miva.com

        Comment


          #5
          I was interest in adding it to a contact form.
          Thank you, Bill Davis

          Comment

          Working...
          X