[Card Grant] Say when a card was frozen by one time use - #14696
Open
Acidicts wants to merge 7 commits into
Open
Conversation
…which happens when spending on a `one_time_use card` it will say "Frozen by one time use, contact the org for any inquiries" With rspec tests
Contributor
Author
anishanne
requested changes
Aug 21, 2026
…ages The method now checks the `one_time_use` flag and returns `false` early when no `stripe_card` is present. UI templates use the new condition, display clearer “Frozen by One Time Use” text, and update the tooltip to reference the organization name.
Changed tooltip label to include event name and removed unnecessary transform from icon style.
Contributor
Author
anishanne
requested changes
Aug 22, 2026
| <% elsif stripe_card.frozen? && stripe_card.last_frozen_by && card_grant.frozen_by_one_time_use? %> | ||
| <div class="fs-mask"> | ||
| <strong>Frozen by</strong> | ||
| <span title="Contact <%= card_grant.event.name %> for any issues with this"><%= "One Time Use" %></span> |
Contributor
There was a problem hiding this comment.
This reads as if the grant was frozen by a user that is called One Time Use.
Maybe "Frozen" and "Automatically after your first purchase"?
Or, "Automatically by {orgname} after your first purchase"?
| <%= status_badge card_grant.status_badge_type %> | ||
| <%= card_grant.state_text %> | ||
| <% if card_grant.frozen_by_one_time_use? %> | ||
| Frozen by One Time Use |
Contributor
There was a problem hiding this comment.
nit: Let's lowercase one time use
Suggested change
| Frozen by One Time Use | |
| Frozen by one time use |
Contributor
There was a problem hiding this comment.
Actually see above re "Frozen by one time use" language - we should swap to something more accurate like Frozen by orgname after first purchase.
| <%= card_grant.state_text %> | ||
| <% if card_grant.frozen_by_one_time_use? %> | ||
| Frozen by One Time Use | ||
| <span class="info tooltipped tooltipped--e inline-flex items-center" aria-label="For help with your grant, please reach out to <%= card_grant.event.name %>."> |
Contributor
There was a problem hiding this comment.
For admins/managers maybe swap this to something helpful? ie that defrosting clears the one time use? You can branch on organizer_signed_in for this
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.





Summary of the problem
When someone spends on a one time use grant card, the card freezes automatically (
StripeAuthorizationService::CreateFromWebhookfreezes it as the system user). The grant page just says "Frozen" with no reason, so recipients assume something broke and message #hcb when they should be going to the org that issued the grant.Describe your changes
Added
CardGrant#frozen_by_one_time_use?, which is true when the grant is one time use and its card was frozen by the system user. When that's the case:Specs cover the system user case, a freeze by a regular user, a freeze with no
last_frozen_by, and a card that's inactive without being one time use.