impress-org / donation-block-for-stripe

A beautiful donation form block for WordPress. Accept donations in minutes using Stripe.
7 stars 1 forks source link

Add Google ReCaptcha v2 integration #53

Closed DevinWalker closed 1 year ago

DevinWalker commented 1 year ago

Description

This PR adds a new integration with Google ReCAPTCHA v2.

Affects

Step 1 of the donation form. If integrated, you'll see a new ReCAPTCHA that when completed will allow you to move to step 2 of the donation form.

Visuals

Please watch this video overview:

https://www.loom.com/share/24bda48da6c24abfaacaa503043c07b8

Testing Instructions

  1. Install the current block from the WP.org directory
  2. Connect Stripe and set up multiple donation forms on the same page with different settings per block
  3. Install the new version of the plugin via zip
  4. Compare before and after for any breakage
  5. Activate the new ReCAPTCHA integration
  6. Ensure you're unable to donate without first confirming the captcha.

Benunc commented 1 year ago

I take that back. This PR is not working for me when there are two different forms/blocks on a site. I'm working on some steps to replicate a problem, but it looks to me like changing settings on one block is affecting blocks on different pages/posts.

Hold on merging this while I test further.

Benunc commented 1 year ago

Steps to replicate a problem:

  1. Install this PR
  2. Make a new page named "With reCAPTCHA" and put a form on it
  3. Register reCAPTCHA and configure it (keys, etc) on that form.
  4. Make a new page named "without reCAPTCHA" and put a form on it.
  5. Disable reCAPTCHA on that form/block
  6. Go back to the form created in step 2.
  7. Attempt a donation WITHOUT clicking to confirm that you are a human.
  8. It'll go through to the second page with no issue.

Check the asana task and the QA channel for one-click logins to a sandbox already set up to replicate this issue

DevinWalker commented 1 year ago

@Benunc I just resolved the issue you brought up in QA. See demo here:

https://www.loom.com/share/ee6db145d4d648a4ad66bc87919319fa

Please re-review when you can! Thanks