Skip to content

Conversation

@YodaLightsabr
Copy link
Contributor

Summary of the problem

It can be annoying to manually copy and paste merchant IDs

Describe your changes

This PR adds a button to the transaction meatball menu to make this process easier

image

@YodaLightsabr YodaLightsabr requested a review from a team January 15, 2026 01:16
<% allowable = hcb_code.stripe_card? && hcb_code.pt.hcb_decline_reason == :merchant_not_allowed && hcb_code.stripe_card&.card_grant.present? %>
<% reversible_disbursement = hcb_code.disbursement? && hcb_code.disbursement.present? && policy(hcb_code.disbursement.destination_event).create_transfer? %>

<% if (disputable || flagable || pinnable || open_invoice || reversible_disbursement) && organizer_signed_in?(as: :member) %>
Copy link
Member

Choose a reason for hiding this comment

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

This will need to be edited

<% end %>
<% end %>
<% if allowable %>
<% if CardGrantPolicy.new(current_user, hcb_code.stripe_card.card_grant).permit_merchant? && !hcb_code.stripe_card.card_grant.merchant_lock.include?(hcb_code.stripe_merchant["network_id"]) %>
Copy link
Member

Choose a reason for hiding this comment

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

These Pundit calls will need to make it into L9

<% flagable = (hcb_code.stripe_card? || hcb_code.stripe_force_capture?) && hcb_code.stripe_card.present? && !hcb_code.personal_transaction.present? %>
<% open_invoice = hcb_code.invoice? && hcb_code.invoice.open_v2? %>
<% disputable = can_dispute?(hcb_code:) %>
<% allowable = hcb_code.stripe_card? && hcb_code.pt.hcb_decline_reason == :merchant_not_allowed && hcb_code.stripe_card&.card_grant.present? %>
Copy link
Member

Choose a reason for hiding this comment

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

This variable name isn't descriptive enough imo and we probably need one of these for each button

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.

3 participants