Replace payum's plain-PHP GetHttpRequest action with the header-aware one by default - #78
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 2.x #78 +/- ##
============================================
+ Coverage 98.41% 98.43% +0.01%
- Complexity 202 206 +4
============================================
Files 19 19
Lines 506 512 +6
============================================
+ Hits 498 504 +6
Misses 8 8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
… one by default NotifyAction reads the QuickPay-Checksum-Sha256 header off GetHttpRequest::$headers, and among payum/core's own bridges only the Symfony one sets that property. Payum's core config puts its plain-PHP GetHttpRequestAction in place before this factory runs, so a plain-PHP Payum that did not know to swap in HeaderAwareGetHttpRequestAction rejected EVERY callback as unsigned, with a 400, silently — for every payment. The README told you; nothing enforced it. QuickpayGatewayFactory::populateConfig() now replaces the configured payum.action.get_http_request with HeaderAwareGetHttpRequestAction when — and only when — it is payum's exact plain-PHP class: the Symfony bridge (a different class, wired by PayumBundle/Sylius) is left alone, and so is anything a consumer configured deliberately (a subclass, another action). What is swapped is the one value nobody chose. Registering the header-aware action yourself keeps working and is now redundant. Refs #71 (A3).
Member
Author
loevgaard
force-pushed
the
feat/auto-header-aware-get-http-request
branch
from
August 17, 2026 09:43
3a3aa04 to
cc335de
Compare
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.
Implements A3 of #71 (marked optional there — this is the proposal; small and self-contained, easy to drop if you'd rather keep it explicit).
NotifyActionreadsQuickPay-Checksum-Sha256offGetHttpRequest::$headers, and among payum/core's own bridges only the Symfony one sets it. Payum's core config puts its plain-PHPGetHttpRequestActionin place beforepopulateConfig()runs, so a plain-PHP Payum that did not know to swap inHeaderAwareGetHttpRequestAction(#64) rejected every callback as unsigned,400, silently, for every payment. The README said so; nothing enforced it.QuickpayGatewayFactory::populateConfig()now replacespayum.action.get_http_requestwithHeaderAwareGetHttpRequestActionwhen — and only when — the configured value is payum's exact plain-PHP class:A real-gateway test executes
GetHttpRequestthrough the factory-built gateway with$_SERVER['HTTP_QUICKPAY_CHECKSUM_SHA256']set and reads the header back. README (Callbacks),docs/UPGRADE-2.0.mdand CLAUDE.md updated; the e2e harness keeps its explicit registration as the reference for consumers wiring their own (comment says it is now redundant).composer alland the dependency analyser green (322 tests).