Skip to content

Document the flow, the callback reality, Sylius wiring and scope - #66

Open
loevgaard wants to merge 1 commit into
feat/header-aware-get-http-requestfrom
docs/readme-flow-callbacks-sylius
Open

Document the flow, the callback reality, Sylius wiring and scope#66
loevgaard wants to merge 1 commit into
feat/header-aware-get-http-requestfrom
docs/readme-flow-callbacks-sylius

Conversation

@loevgaard

Copy link
Copy Markdown
Member

Fixes gaps G1, G3, G4 and G5 of #57. Stacked on #64 (it documents the HeaderAwareGetHttpRequestAction that PR ships) — merge that first; this PR's own diff is the last commit.

What changed

  • G1 — the flow. The Usage example executed Capture against a fresh model — exactly what does not work here: Capture is a pure money operation, and against an unauthorized payment it yields a Quickpay ValidationException instead of the payment window. The new section states that Authorize is the interactive entry point (unlike gateways where Capture drives the whole flow), shows the authorize-token pattern, and describes what Capture/Refund/Cancel actually do.
  • G3 — callbacks. The two-URL reality (payment-window authorize → per-payment notify token; API-issued capture/refund/cancel → the account-wide url, empty by default, so those confirmations silently vanish) was only in the upgrade guide. It is operational knowledge every new consumer needs, so it is now in the README, along with the synchronized/polling alternatives and the plain-PHP header-aware action registration.
  • G4 — Sylius. Factory registration via payum.gateway_factory_builder, where the stored config keys come from, and use_authorize: true — Sylius drives its checkout through Capture by default, which is the wrong entry point for this gateway.
  • G5 — scope. One paragraph saying what the package deliberately does not do: hosted payment window only (SAQ-A), no card-data authorize, no subscriptions, no payouts.

Docs only — no code changes.

The README's Usage example executed Capture against a fresh model —
exactly what does not work: Capture here is a pure money operation, and
against an unauthorized payment it fails with a ValidationException
rather than opening the payment window. The new flow section says
plainly that Authorize is the interactive entry point, shows the
authorize-token pattern, and explains what Capture/Refund/Cancel are.

Also added, because every new consumer needs them and they only lived in
the upgrade guide or nowhere:

- the two-callback-url reality (operation callbacks go to the
  account-wide url, which is empty by default — so they are silently
  not delivered) and the shipped HeaderAwareGetHttpRequestAction for
  plain-PHP setups;
- a Sylius section: factory registration, stored config keys and
  use_authorize: true, since Sylius drives checkout through Capture by
  default;
- a scope statement: hosted payment window only, no card-data
  authorize, subscriptions or payouts.
@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.46%. Comparing base (952142e) to head (78fab6c).

Additional details and impacted files
@@                          Coverage Diff                          @@
##             feat/header-aware-get-http-request      #66   +/-   ##
=====================================================================
  Coverage                                 95.46%   95.46%           
  Complexity                                  138      138           
=====================================================================
  Files                                        15       15           
  Lines                                       375      375           
=====================================================================
  Hits                                        358      358           
  Misses                                       17       17           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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