magento2
magento2 copied to clipboard
fix invoice cancel from backend 404 error issue
Description (*) Getting 404 error while canceling invoice form backend
Related Pull Requests
The issue comes from https://github.com/magento/magento2/commit/3e637056d1031185c7c8989f7a24302cecb5b27b#diff-f55a86b611d11bb9a801c4b16ba9ac4b17dab4c325d252b86d5d3a8b8275c291
Canceling invoices from the backend results in a 404 error due to the core controller class Magento\Sales\Controller\Adminhtml\Order\Invoice\Cancel using Magento\Framework\App\Action\HttpPostActionInterface instead of Magento\Framework\App\Action\HttpGetActionInterface. This misconfiguration prevents proper access, triggering the error.
Manual testing scenarios (*)
- create an order with an offline payment method
- create an invoice for the order (offline)
- cancel the invoice
Resolved issue resolves https://github.com/magento/magento2/issues/39298: Fix offline invoice capture (404)