Skip to content

Show Refund as a sidebar action and tidy payment status updates - #3801

Open
tuguirazvan wants to merge 1 commit into
masterfrom
refund-action-row
Open

tuguirazvan wants to merge 1 commit into
masterfrom
refund-action-row

Conversation

@tuguirazvan

@tuguirazvan tuguirazvan commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

Tidies the payment details screen.

  • "Payment: Refund" becomes a "Refund Payment" action next to Edit and Delete
  • Payment status updates show as a simple list: message, Refund ID, date, with no grey table
  • Stripe refund IDs get a label and a small grey code box

Pairs with the Stripe refund dialog in Strategy11/formidable-stripe#500 and Strategy11/formidable-stripe#547.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Payment status updates are displayed as notes, including relevant details and dates. Refund IDs are clearly labeled, and complex values are shown in a readable format.
    • Eligible completed payments display a “Refund Payment” action.
  • Style
    • Payment notes use a clearer layout, with distinct styling for note IDs.

- Move "Payment: Refund" to a "Refund Payment" action next to Edit and Delete
- Render payment status updates as a list (message, labelled details, date)
- Label Stripe refund IDs and show them in a small code box

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

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Payment metadata now appears as styled notes, and eligible payments show a refund action in the payment details view instead of the sidebar.

Changes: Payment details

Layer / File(s) Summary
Payment-note rendering and styles
stripe/views/payments/show.php, resources/scss/admin/layout/page/_single-entry-page.scss, css/frm_admin.css
Payment metadata now renders as notes. Messages and dates display separately, remaining values are formatted, and refund IDs use a specific label. Styles format the note list, note spacing, and note IDs.
Refund action placement and rendering
stripe/controllers/FrmTransLitePaymentsController.php, stripe/views/payments/show.php, stripe/views/payments/sidebar_actions.php
The payment details view adds a refund action when the status is complete and a receipt ID is present. The controller renders the confirmation link and label. The sidebar no longer renders its previous refund section.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant PaymentView
  participant FrmTransLitePaymentsController
  participant refund_link
  PaymentView->>FrmTransLitePaymentsController: show_refund_action(payment)
  FrmTransLitePaymentsController->>refund_link: Get refund link
  refund_link-->>FrmTransLitePaymentsController: Return link
  FrmTransLitePaymentsController-->>PaymentView: Render confirmation link and label
Loading

Suggested reviewers: crabcyborg

Merge Risk: Minimal · up to d1ed8

This change moves the refund action into the payment details screen and restyles payment status notes. No concrete defect was established in the supplied code. The one open question is whether the paired Stripe and Authorize.Net add-ons return refund markup that the new guard would hide. Confirm that when testing the refund flow with those add-ons.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the two main changes in the PR: moving the refund link into a sidebar action (show_refund_action in FrmTransLitePaymentsController, removal of the sidebar Payment section) and restylin…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the two main changes in the PR: moving the refund link into a sidebar action (show_refund_action in FrmTransLitePaymentsController, removal of the sidebar Payment section) and restyling payment status updates as a list. It matches the changeset and the PR objectives. Other changes, such as the Refund ID label and code-box styling, are not named, which is acceptable because a title need not cover every detail.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between d4bf9a3 and d1ed85d.

Files selected for processing: 5

  • css/frm_admin.css
  • resources/scss/admin/layout/page/_single-entry-page.scss
  • stripe/controllers/FrmTransLitePaymentsController.php
  • stripe/views/payments/show.php
  • stripe/views/payments/sidebar_actions.php
Files with no reviewable changes: 1

  • stripe/views/payments/sidebar_actions.php

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@deepsource-io

deepsource-io Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in d4bf9a3...d1ed85d on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
PHP Dec 2, 2026 3:54p.m. Review ↗
JavaScript Dec 2, 2026 3:54p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

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