ReverseLastTransaction Method
Used to reverse/void a previous transaction.
Object Oriented Interface
public function doReverseLastTransaction();
Procedural Interface
inpaydirect_fdmsdebit_do_reverselasttransaction($res);
Remarks
This method is used to reverse a previous transaction in the case a response was not received from the host or to void a previous Sale or Credit transaction.
A Timeout Reversal is needed when a terminal initiates a debit transaction (Sale or Credit) to the FDMS host, but the host fails to send a response back to the terminal for any reason. If a transaction times out or you receive a network connectivity error, you should immediately call ReverseLastTransaction. In this situation you don't know whether the host received the request and the response back to you was lost, or if the host ever received the request at all. Therefore the ReverseLastTransaction method can used to reverse the last transaction sent by this class. You must not change any properties or call any other methods (including Reset), as ReverseLastTransaction operates based on the current state of the class.
First Data will always send an ResponseApprovalCode of "AP888888" or "AP868686" on a reversal response, and the ResponseCaptureFlag value will be False. First Data does not check whether the original transaction occurred or not.
If you do not receive a response to the reversal (eg, it also times out), you must continue to call ReverseLastTransaction until you do receive a response.
Note: A Debit Reversal must not be used by the merchant as a way to credit a customer for returned merchandise.
Important Note: You must ping your list of service provider URLs and update the URL property to the service provider with the shortest response time every 100 transactions, as well as when your application initially starts. This is not a normal ICMP ping - to determine the fastest transaction URL you must use the special Ping method inside the FDMSRegister class. (You may update your list of service provider URLs with the FDMSRegister class's ServiceDiscovery method).