IPN role is to validate something. ... So, a transaction.
Your main table for this part is a table called 'Transactions'
The shop or whatever is preparing a transaction, using this MVC for transaction.
Then at any moment, an IPN can arrive to close the transaction and validate. How it works ?
Very easy.
You've created a new function in the controller, for instance ipn(), and the entry point to furnish to PayPal system is the url of your component :
index.php?option=comxxxx.....view=transaction&task=ipn
This controller function get the posted informations from PayPal, decode them and treat them. The transaction item is updated, and you can continue the process elsewhere or a callback function.
Do not use the redirections because the robot processing IPN is not human and not able to read anything
One important thing is to write all this in the FRONT of your component, because the robot do not have admin access either.
What to say more ?
Need help for processing the first part ? Querying paypal ?
If I need to implement any kind of TPE, I read the documentation and I get all instructions. for POST values and IPN receipts.
So ...
You got it ?