progressivetech / net.ourpowerbase.remoteform

Remoteform allows you to easily create CiviCRM forms on a remote web site using a few lines of javascript code.
Other
13 stars 8 forks source link

Donation page hanging on stripe returning Zip Code / other errors #57

Open graceolivia opened 2 months ago

graceolivia commented 2 months ago

System

Drupal 10 Stripe

Issue

If RemoteForms successfully sends out a payment to Stripe but Stripe sends back an error instead of a success - say because the zip code wasn't entered in their iFrame (it springs out at the last minute and some of my users miss it), the error only prints off in the console log, as caused by this line.

The program stops there and the spinner continues until the user refreshes, which is confusing for them because they don't know what went wrong.

My solution

I put together one (somewhat hacky) solution to this on my forked copy of RemoteForms and I would be happy to polish it up and make a PR here if that would be useful to others! Let me know, and thanks again!

jmcclelland commented 2 months ago

Thanks - yes, a PR would be great. I see from the comment that the intent is to warn the user, but adding a line in the console is not a particularly effective way to do that.