I am using PHP with a template-engine and Realex Payments, just like any third party payment.
One situation arises with HPP thus:
Can someone suggest a solution for this?
The Realex Payments HPP has been designed to prevent this from happening.
Once the payment is completed successfully, the Realex servers send a message directly to your web site servers with the results of the transaction. The customer's browser is not involved - you will always know the status of the transaction. This message is sent to your Realex Payments response URL.
There are two scenarios if the customer is disconnected from the network.
In every case, you should send an email to the customer once you receive the message from Realex after the transaction. This is a great comfort to the customer.
You should also collect all the information you need before you redirect the customer to the HPP, as the network may be lost and you won't be able to get more data from them (such as their address or other info you need to complete the order).
There is a third scenario, where Realex cannot connect to your site to send the message. We retry a couple of times, and then alert our operations staff who will follow up directly with you. The customer will be shown a generic message asking them to contact you for further information.