Context: How to cancel an order programmatically?
Implementation
Details:
- How is
\Magento\Sales\Model\Order\Payment::cancel()
implemented and used? - How is
\Magento\Sales\Model\Order::registerCancellation()
implemented and used?
Usages
1. \Magento\Authorizenet\Controller\Adminhtml\Authorizenet\Directpost\Payment\Redirect::execute()
2. \Magento\Paypal\Controller\Express\AbstractExpress\Cancel::execute()
3. \Magento\Sales\Controller\Adminhtml\Order\Cancel::execute()
4. \Magento\Sales\Controller\Adminhtml\Order\MassCancel::massAction()
5. \Magento\Sales\Model\AdminOrder\Create::createOrder()
6. \Magento\Sales\Model\Service\OrderService::cancel()
Details: How to cancel an order by the /V1/orders/:id/cancel
Web API?