I was trying to understand what's the best way to read incoming IPN messages from PayPal. This need comes from the order workflow we implemented in our website. For example: when a payment is authorized, I would like the order to be set to a particular status. Then, when a payment is captured, I would like the order to be set to another specific status. I believe that IPN is the tool to use when you need the most accurate information about the transaction result, but apparently in Magento 2 it is not easy to reach that message.
So I made a module that extends \Magento\Paypal\Model\Ipn, working with the Magento DI preference way. The module I made resulted in a big copy-paste of a public method and 4 protected methods just to customize 2 of those methods. It is far from ideal. Also, the preference approach can lead to the good old rewrite conflicts.
The plugin approach is not an option, because the methods I needed to intercept are not public.
What I feel is missing here, is some event dispatching. I will open a github issue.
Anyone can suggest some other approach to read the IPN messages?