What are Pending Transactions?
When the transaction is started, it should be logged on your end, and it is logged as pending at that point.
Essentially, the transaction happens on two legs, the first is the payment leg where the actual debit will occur, and the second is the query leg where your system queries the web service to get the actual status for the transaction.
If for any reason, a timeout occurs on any of the systems involved, and for this reason, the query leg fails to confirm transaction status, the response on your end will remain pending. This is the kind of scenario that will warrant a reQuery. The reQuery is to [manually] redo the failed query leg that helps fetch the transaction response.
Note that in the above example, the transaction has already occurred at this point (after payment leg), and is already either failed or successful. The reQuery is to ensure that your system can be updated appropriately and the customer provided value if necessary.
ReQuery is basically a GetTransaction request called on command when required (i.e not related to a transaction). As with the GetTransaction above, the following parameters are sent:-
- productid (product id as returned by WebPAY)
- amount (approved amount as returned by WebPAY)
- txn_ref (transaction reference as returned by WebPAY)
In addition the application will timeout after roughly 10 minutes, and you will receive a failed transaction response if you reQuery. You should also endeavour to requery transactions with Response Code Z0 and 10001.