Skip to content

[CardGrant] Add large banner when transactions decline#13239

Merged
garyhtou merged 14 commits intomainfrom
mxg-add-large-callout-to-card-grant-page
Mar 31, 2026
Merged

[CardGrant] Add large banner when transactions decline#13239
garyhtou merged 14 commits intomainfrom
mxg-add-large-callout-to-card-grant-page

Conversation

@manuthecoder
Copy link
Copy Markdown
Contributor

Closes #13215

Preview

image

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a prominent warning callout on card grant transaction pages when a decline occurs due to a disallowed merchant, guiding users to contact the issuing organization.

Changes:

  • Detect :merchant_not_allowed declines in card grant transactions.
  • Render a warning callout above the transaction table with guidance to contact the event team.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/views/card_grants/_transactions.html.erb Outdated
Comment thread app/views/card_grants/_transactions.html.erb Outdated
manuthecoder and others added 2 commits March 20, 2026 15:14
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread app/views/card_grants/_transactions.html.erb Outdated
Comment thread app/views/card_grants/_transactions.html.erb Outdated
<% if hcb_codes&.any? %>
<h2 class="heading h2 leading-[1.5] mt2 ml0 pt1 pb1 pr2">Transactions on this card</h2>

<% if hcb_codes.any? { |hc| hc.canonical_pending_transactions.any? { |pt| pt.hcb_decline_reason == :merchant_not_allowed } } %>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it might be better to move this logic to the controller and include this is its own partial directly on the show page.

@manuthecoder manuthecoder changed the title Add large banner when transactions decline [CardGrant] Add large banner when transactions decline Mar 30, 2026
@garyhtou garyhtou dismissed YodaLightsabr’s stale review March 30, 2026 23:53

Was moved to its own partial. logic is now simple enough that we can keep it in the partial.

@garyhtou garyhtou enabled auto-merge March 30, 2026 23:53
@garyhtou garyhtou added this pull request to the merge queue Mar 30, 2026
Merged via the queue into main with commit baf354f Mar 31, 2026
17 checks passed
@garyhtou garyhtou deleted the mxg-add-large-callout-to-card-grant-page branch March 31, 2026 00:03
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.

[Card Grants] Add a callout for invalid merchant declines

4 participants