phpmysqltemplate-enginerealex-payments-api

How to save online transaction data if mishap happens at the clients/payers side?


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?


Solution

  • 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.

    1. The network is disconnected before they make the payment. In this case, you have an item in their shopping cart that they have not paid for yet. The customer will need to be able to go back to your cart and try to pay again.
    2. The network is disconnected after they make the payment. In this case, the customer will not know if they have successfully paid or not, but you will. They will probably try to go back and pay again, which will fail if the order id is the same. They will probably go back to your site to see their shopping cart. You should allow them to check their customer account to see orders that have been completed.

    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.