Show Quickpay operation history on the admin order view - #114
Merged
Conversation
Each Quickpay payment on the admin order show page renders a panel with the payment's live operation history - every operation with type, amount, Quickpay status code and message, pending flag and timestamp, plus the captured balance and a test-mode badge. The data is fetched from Quickpay after the page has rendered (a sylius_ui block placeholder plus a small fetch script), so the order page is never delayed by a slow gateway; failures render an inline notice with a retry link. No storage, no entities, no migrations - the panel reflects what Quickpay reports now. Fixes #105
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 2.x #114 +/- ##
============================================
+ Coverage 78.03% 79.60% +1.56%
- Complexity 105 114 +9
============================================
Files 15 16 +1
Lines 469 510 +41
============================================
+ Hits 366 406 +40
- Misses 103 104 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
loevgaard
commented
Aug 10, 2026
Admin routes live in routes/admin.yaml imported with the /admin prefix. The notify endpoint stays directly in routes.yaml on purpose - Quickpay's servers call it with the URL configured account-wide in the Quickpay manager, so its path must not depend on the application's locale setup.
Global (unprefixed) routes live in their own file per convention; routes.yaml only composes the prefixed and unprefixed imports.
Keeps the route under the admin firewall and access control also in applications that customize the admin path.
The admin operations controller renders templates through Twig\Environment directly, so the dependency is no longer transitive-only.
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.
Fixes #105
What it does
Each Quickpay payment on the admin order view gets a live operation history panel: every operation (type, amount formatted in the payment's currency,
qp_status_code+qp_status_msgwith the acquirer message as tooltip, pending label, timestamp), the captured balance, and a test-mode badge. No storage, no entities, no migrations — 2.x's scalarquickpayPaymentIdis enough to fetch everything on demand.Deferred, never blocking the order page
sylius_uiblock prepended ontosylius.admin.order.show.payment_content(guarded byhasExtension('sylius_ui')) — it renders only a placeholder for payments carrying aquickpayPaymentId; payments without one get no panel at allGET /admin/quickpay/payments/{id}/operationsafter page load (auto-load with retry, per the issue's suggested default); the/adminpath puts the route under the standard Sylius admin firewall/access controlController/Admin/PaymentOperationsActionresolves the api key from the payment's own gateway config (with the 1.xapikeyfallback), fetches via the 5s-cappedQuickpay/ClientFactoryfrom Validate Quickpay credentials from the gateway configuration form #106, and renders the partial — any failure returns 502 with an inline notice + retry link, and the retry re-fetches just that payment's panelVerified
PaymentsEndpoint+ Valinor mapper over a realistic snake_case payload (so the DTO mapping is exercised, not stubbed), plus unreachable-API → 502, unknown payment → 404, noquickpayPaymentId→ 404, and the extension prepend. 73 tests, PHPStan (cold), ECS, Rector green.lint:container,lint:twig(4 templates),lint:yaml(32 files),debug:routerall green.Labels/messages are translated in all 16 shipped locales (12 new
ui.*keys).