-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix offline invoice capture (404) #39297
base: 2.4-develop
Are you sure you want to change the base?
Fix offline invoice capture (404) #39297
Conversation
Hi @nige-one. Thank you for your contribution!
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
@magento create issue |
The same issue occurs when trying to cancel an invoice, resulting in a 404 error, because its controller class Magento\Sales\Controller\Adminhtml\Order\Invoice\Cancel also implements the HttpPostActionInterface. |
The culprit : 3e63705 |
can please somebody review this? This fix should be part of the core asap... |
@magento run all tests |
@magento run all tests |
@magento run all tests |
@nige-one Thank you for the contribution & collaboration! ✔️ QA Passed Preconditions:
Steps to reproduce:
Note: Added "protected $_canCapture = true;" in app/code/Magento/OfflinePayments/Model/Checkmo.php in Order to Capture the invoice. Before: ![]() After: Functional B2B tests are failing hence moving this PR to Extended Testing. |
@magento run all tests |
@magento run Functional Tests B2B, Functional Tests CE, Functional Tests EE, Integration Tests, Unit Tests |
Functional B2B: Two of the Functional B2B test failure are inconsistent and seems to be flaky. They neither part of PR nor failing because of the PR changes. The other two are known issues. Known Issues: Functional EE: Test failures for Functional EE are inconsistent and seems to be flaky. They neither part of PR nor failing because of the PR changes. Hence Moving this PR In Merge In Progress Status. |
Description (*)
It's not possible to capture offline payment method invoices via the backend ('Capture' button). Trying it will lead to a 404.
Related Pull Requests
The issue comes from 3e63705#diff-f55a86b611d11bb9a801c4b16ba9ac4b17dab4c325d252b86d5d3a8b8275c291
The class has been changed to be implementing
HttpPostActionInterface
. Clicking the 'Capture' button will send a GET request. Magento's request validator\Magento\Framework\App\Request\HttpMethodValidator
will throw an exception leading to a 404 because it expects a POST request.Manual testing scenarios (*)
Resolved issues: