In general all financial gateways work the same way. You transfer the control to the payment gateway and you get two calls back.One is used as a confirmation of the transaction and can be used to inform your customer that you have received confirmation of the transaction (not the result!) of the bank, and a second one that is ‘hidden’ and need to be used to update payment info in your application (payed, not payed, delayed …). The transactions need to be protected by keys (useually SHA) and you need to verify the origin (to prevent that anyone can send the invisible url and register payed, even if it isn’t ). Some providers have an api to request confirmation so you will be able to check just before delivery if things are ok at the bank (on transaction number). That’s a safe way as it cannot be influenced easily by a hacker as the initiation is at another point.
That’s the reason why you get more emails from webshops: confirmation of your order and a confirmation of your payment.
I haven’t looked at PayU, but I’m pretty sure it works the same way. In general it requires careful programming as you’re working with financials, but it really isn’t rocket science.
The first call can be redirected to your own visual page, the second one is a plain api call and needs to be implemented as a scriptcase blank application.