Question

I am working on this Magento 2 extension and part of the features is need to entry in another table where order total will be inserted. so what I need is to find order invoice status paid event observer.How can I get order invoice status paid event in observer?

Was it helpful?

Solution

Here is the list of Magento 2 events.

https://cyrillschumacher.com/magento2-list-of-all-dispatched-events/

In your case you can use sales_order_invoice_pay event which is calling from below location inside pay() function.

vendor/magento/module-sales/Model/Order/Invoice.php

$this->_eventManager->dispatch('sales_order_invoice_pay', [$this->_eventObject => $this]);
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top