Skip to content

Add pay gem and payments/allocations/refunds#1487

Draft
jmilljr24 wants to merge 63 commits intomainfrom
add-pay-gem
Draft

Add pay gem and payments/allocations/refunds#1487
jmilljr24 wants to merge 63 commits intomainfrom
add-pay-gem

Conversation

@jmilljr24
Copy link
Copy Markdown
Collaborator

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?

  • Add Payments, Allocations, Refunds models.
  • Add pay gem to add payments via stripe
  • Payment types: Cash, Check, ExternalProcessor (anything through pay gem)

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_cents on a Payment. 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

end
end

def checkout
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Temp testing of stripe payment checkout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant