For ease of review, I added an extra commit which I believe fixes the issue we encountered (the two commits can then be squashed before merging)
Here's how I tested it locally:
1) Commented out postToStripe(token) in our own stripe-donation.js
2) Loaded the page at /fundraising/ on my local version
3) Clicked the "donate monthly" button
4) Without my fix, the form is submitted and the page reloads. With my fix, the page doesn't reload and the console shows "reCAPTCHA validated. Posting to stripe...")
I took the work from #1450 (which was reverted later because of https://github.com/django-recaptcha/django-recaptcha/issues/348).
For ease of review, I added an extra commit which I believe fixes the issue we encountered (the two commits can then be squashed before merging)
Here's how I tested it locally:
1) Commented out
postToStripe(token)
in our ownstripe-donation.js
2) Loaded the page at/fundraising/
on my local version 3) Clicked the "donate monthly" button 4) Without my fix, the form is submitted and the page reloads. With my fix, the page doesn't reload and the console shows "reCAPTCHA validated. Posting to stripe...")