Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent refund for old registrations #4682

Merged
merged 1 commit into from Oct 6, 2019

Conversation

@viroulep
Copy link
Member

commented Oct 5, 2019

Fixes #3224.
This change addresses a potential financial loss if an organizer or WCA staff decides to go crazy.
I initially prevented this at a controller level, but I realized some WCA staff may change the competition's date and overrun a check doing roughly current_date > competition_date + 21.days.
So instead I created a job that clears the connected_stripe_account_id after an arbitrary amount of days (I set it to 21).

This way there is no way for anyone to issue refund, except by going directly to the connected Stripe account dashboard.

cc @Mollerz, @ChrisWrightWCA, @EdHollingdale

@viroulep viroulep referenced this pull request Oct 5, 2019
@viroulep viroulep force-pushed the viroulep:timeout-refund branch from 6736f6f to 876c84d Oct 5, 2019
@EdHollingdale

This comment has been minimized.

Copy link

commented Oct 5, 2019

Thanks @viroulep !

Copy link
Member

left a comment

I like this approach!

WcaOnRails/app/views/registrations/edit.html.erb Outdated Show resolved Hide resolved
@viroulep viroulep force-pushed the viroulep:timeout-refund branch from 876c84d to c78e3cc Oct 6, 2019
@viroulep viroulep force-pushed the viroulep:timeout-refund branch from c78e3cc to b208289 Oct 6, 2019
@viroulep viroulep merged commit 413d8a9 into thewca:master Oct 6, 2019
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.004%) to 95.935%
Details
@viroulep viroulep deleted the viroulep:timeout-refund branch Oct 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.