Reading PayPal developer documentation (and this is a lot of documentation) I'm not sure if IPN is mandatory or I can simply ignore it.
Of course, I must implement some other mecanism in order to know if the payment was correct. I thought doing something like this:
Create a new payment (via web service) with a different code in both returnUrl and cancelUrl. This codes are generated randomly for every payment and stored in DB.
When the user finishes the payment (OK or KO), PayPal will redirect its page to my site and I will be able to know if the code is correct.
If there is a problem (user closes window, response doesn't arrive, codes don't match...) will be handled manually looking the transactions on PayPal site.
Do you think is this ok?
Thanks.