How is an online refunding implemented?

Initialization

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/NewAction.php#L63-L63


https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Controller/Adminhtml/Order/CreditmemoLoader.php#L188-L188

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Controller/Adminhtml/Order/CreditmemoLoader.php#L208-L209


https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/Order/CreditmemoFactory.php#L83-L98


https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/Order/Creditmemo.php#L386-L396

Interface

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Block/Adminhtml/Order/Creditmemo/Create/Items.php#L59-L70


https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items.phtml#L170-L174

Controller

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/Save.php#L54-L63

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/Save.php#L71-L75

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/Save.php#L83-L92

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/Save.php#L102-L104

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/etc/di.xml#L47-L47


https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/Save.php#L105-L105


https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/Service/CreditmemoService.php#L127-L137

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/Service/CreditmemoService.php#L138-L139

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/Service/CreditmemoService.php#L141-L147


https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/Order/Creditmemo/Item.php#L172-L191


https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/Service/CreditmemoService.php#L149-L149

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/Service/CreditmemoService.php#L151-L152


https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/Order/CreditmemoRepository.php#L125-L141


https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/ResourceModel/Metadata.php#L43-L49

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/ResourceModel/Order/Creditmemo.php#L11-L11

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/ResourceModel/Order/Creditmemo.php#L15-L20

https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Sales/Model/ResourceModel/EntityAbstract.php#L14-L19


https://github.com/magento/magento2/blob/8fd3e8/lib/internal/Magento/Framework/Model/ResourceModel/Db/AbstractDb.php#L371-L380

https://github.com/magento/magento2/blob/8fd3e8/lib/internal/Magento/Framework/Model/ResourceModel/Db/AbstractDb.php#L408-L408

Details: How does \Magento\Framework\Model\ResourceModel\Db\VersionControl\AbstractDb::processAfterSaves() work for a credit memo?

See also: