Skip to content

Add pay gem and payments/allocations/refunds#1487

Draft
jmilljr24 wants to merge 76 commits into
mainfrom
add-pay-gem
Draft

Add pay gem and payments/allocations/refunds#1487
jmilljr24 wants to merge 76 commits into
mainfrom
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

@github-actions
Copy link
Copy Markdown

This pull request has been inactive for 30 days. Please update it or let us know if it is still relevant.

maebeale and others added 4 commits May 20, 2026 09:51
* Fix system notifications showing "Oopsie!" by adopting lazy-load pattern

The notifications index rendered data inline inside a turbo frame while
also setting a src attribute to re-fetch the same data. If the redundant
request failed, the turbo:frame-missing handler replaced the content
with an error message. Aligns with the lazy-load pattern used by other
controllers (stories, people, etc.) — skeleton on initial load, data
fetched via turbo frame request.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add turbo_frame: _top to links inside notifications turbo frame

Links inside the notifications_results turbo frame were being
intercepted by Turbo, which tried to load the target page inside
the frame. The show page and polymorphic record pages don't contain
a matching turbo frame, triggering the turbo:frame-missing handler
and showing the "Oopsie!" error.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Updates addressable, net-imap, nokogiri, rack, and rack-session to
patched versions to clear CVE advisories from the scan_ruby CI job.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v4...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Add a where_user_not_locked Person scope and chain it onto the
non-admin relation_scope so that profiles whose user account is
locked are excluded. People with no user record are still included.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
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.

2 participants