Add pay gem and payments/allocations/refunds#1487
Draft
Conversation
jmilljr24
commented
Apr 9, 2026
| end | ||
| end | ||
|
|
||
| def checkout |
Collaborator
Author
There was a problem hiding this comment.
Temp testing of stripe payment checkout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes [link an issue or remove this line]
What is the goal of this PR and why is this important?
EventRegistations (and more models in the future) will require payments. This add the initial framework to handle payments.
How did you approach the change?
Allocations - a payment can be allocated to an event_reg.
Payments - a payer can be a person or organization and can add funds via payment types.
Payments can be refunded via the Refund model. Allocations can be reverted (original allocation record doesn't change. A new Allocation record allocates the funds and references the original allocation.
I decided to add an
amount_remaining_centson aPayment. This is the source of truth for was funds are available that have not been allocated or refunded. Checking based of a all allocations and refunds is possible but this prevents race conditions as well as any data that may be out of sync with stripe via webhooks.UI Testing Checklist
Anything else to add?
The video is not in any special order. Just an overview of the features. UI styling was a low priority since this is such a big change.
Shown is the payments index filtering, Payment creation (without allocating), Allocating a payment, Partial payment Refund, Allocations on a persons event_reg (some examples show an allocation that has been reverted (grayed out with another line item showing the revert in red)
screenrecording-2026-04-09_16-49-42.mp4