Question

I am using PHP with a template-engine and Realex Payments, just like any third party payment.

One situation arises with HPP thus:

  • client browser is disconnected from network after successful transaction is made
  • it fails to save payment status info
  • thus, the status info stays unpaid for the specific order after been paid

Can someone suggest a solution for this?

Was it helpful?

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.

OTHER TIPS

Use transaction, commit and rollback.

"START TRANSACTION" keeps track of all SQL that follows until we enter either COMMIT or ROLLBACK.

"COMMIT" make our codes permanent.

"ROLLBACK" reverses everything to the point before we typed "START TRANSACTION".

e.g.

START TRANSACTION;
SELECT * FROM bank;
UPDATE bank SET amount = '25000' WHERE id ='23';
COMMIT;

But use TRANSACTION when you really need to as TRANSACTION log keeps the record of everything and gets bigger and bigger which consumes more space and takes more time.

I found the answer So i would like to share it... Their is an optional parameter called "notify" if we pass the parameter when the transaction happen the PayPal throws an rmi server to server coll without involving the client side ...

and passes the response parameter's to the notify Url we have passed

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top