Anthrocon-Reg / ubersystem

Anthrocon's Ubersystem - a fork of the MagFest system that handles ticketing, staffing, analytics, volunteers, and tons more
http://anthrocon.org
GNU General Public License v3.0
4 stars 0 forks source link

If cancel Pay With Card, Add Another Pregeg button disabled #44

Closed RigelAC closed 8 years ago

RigelAC commented 9 years ago

After submitting a pre-reg form, click Pay With Card. Click the [X] at the top-right. When you are returned to the prior form, Add Another Prereg button is now disabled.

kitsuta commented 9 years ago

This is somewhat tricky. We can just get rid of the disable function in the first place, but that may be undesired.

In order to re-enable the button, we need to detect when Stripe is closed, which seems like it can only be done with a fully custom Stripe integration. @EliAndrewC thoughts on this?

EliAndrewC commented 9 years ago

You're correct that the reason why we haven't fixed this yet is because Stripe doesn't currently notify us when the user cancels.

There are a few ways we could fix them, but all of them are pretty annoying. Some ideas off the top of my head:

EliAndrewC commented 9 years ago

Note that the "disable all submit buttons when a form is submitted" is a generic behavior for the site. We could probably just turn that off for Stripe forms only, and leave it for the rest of the forms on the site. That might be the best option, now that I think about it; I don't imagine Stripe forms could be submitted while they're already submitting anyway (though we'd definitely want to double-check that).

thaeli commented 9 years ago

Switching to stripe.js is needed for some other issues too; that should be our slightly longer term solution.

On Oct 17, 2014, at 9:37 AM, Eli Courtwright notifications@github.com wrote:

You're correct that the reason why we haven't fixed this yet is because Stripe doesn't currently notify us when the user cancels.

There are a few ways we could fix them, but all of them are pretty annoying. Some ideas off the top of my head:

after the Stripe window opens, attach an event handler to its cancel button so that we can re-enable our windows (downside is if they change the layout of their DOM this will stop working) after the window opens, poll for whether it's still open ever 1 second or something like that, then re-enable the buttons if the window closes without the form being submitted stop using the Stripe embedded form and use the Stripe.js Javascript API for doing this ourselves — Reply to this email directly or view it on GitHub.

binary1230 commented 9 years ago

open to whatever, just keep in mind PCI compliance making sure that at no point is the user typing CC info that is passed to our servers. I imagine stripe.js handles that OK just never used it yet so something to check on.

kitsuta commented 9 years ago

Yeah, custom stripe forms are only a pain because they're more complex to implement. It's all still going to Stripe.

kitsuta commented 9 years ago

Btw @EliAndrewC there's a section in base.html that expressly disables Stripe buttons. It even has a var called DISABLE_STRIPE_BUTTONS_ON_CLICK

So I expect this was specifically implemented, indicating that there's a good reason to keep the disabling behavior.

kitsuta commented 8 years ago

Issue moved to Anthrocon-Reg/anthrocon_plugin #81 via ZenHub.io