Reverses a transaction.
public void Reverse();
Public Sub Reverse()
This method reverses a transaction that has not been settled.
To void/reverse a Sale or AuthOnly transaction first set ReversalTransactionType to specify the type of original transaction that is being reversed. Next set ReversalType to frtFullReversal and call this method.
If the previous transaction did not receive a response and the state of the transaction is uncertain you may perform a Timeout Reversal. To perform a timeout reversal set ReversalTransactionType to specify the type of original transaction that is being reversed. Next set ReversalType to frtTimeoutReversal and call this method.
Timeout Reversals are applicable to the following transaction types:
Full Reversals are applicable to the following transaction types:
After this method returns check the value of Code to determine if the transaction was successful.
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 component. (You may update your list of service provider URLs with the FDMSRegister component's ServiceDiscovery method).
EBT Sale and Reverse Example
benefit.TPPID = "AAA000"; benefit.MerchantTerminalNumber = "00000001"; benefit.MerchantId = "RCTST0000012345"; benefit.GroupId = "20001"; benefit.DatawireId = "00011122233344455566"; benefit.URL = "https://stg.dw.us.fdcnet.biz/rc"; benefit.ApplicationId = "RAPIDCONNECTSRS"; benefit.IndustryType = FdmsrcbenefitIndustryTypes.fritRetail; benefit.STAN = "112"; benefit.TransactionNumber = "1234"; benefit.ReferenceNumber = "1212"; benefit.OrderNumber = "123"; benefit.Card.MagneticStripe = "4003010001234572=21041011234567440"; benefit.Card.EntryDataSource = EntryDataSources.edsTrack2; benefit.EncryptedPIN = "7BD8948B328B21E5"; benefit.KSN = "876543210F008400029"; benefit.TransactionAmount = "1200"; benefit.BenefitType = FdmsrcbenefitBenefitTypes.ebtCash; benefit.Sale(); //Store the aggregate for use later string aggregate = benefit.GetDetailAggregate(); //Later, reverse the transaction Fdmsrcbenefit fdmsrcbenefit = new Fdmsrcbenefit(); fdmsrcbenefit.TPPID = benefit.TPPID; fdmsrcbenefit.MerchantTerminalNumber = benefit.MerchantTerminalNumber; fdmsrcbenefit.MerchantId = benefit.MerchantId; fdmsrcbenefit.GroupId = benefit.GroupId; fdmsrcbenefit.DatawireId = benefit.DatawireId; fdmsrcbenefit.URL = benefit.URL; fdmsrcbenefit.ApplicationId = benefit.ApplicationId; benefit.STAN = "113"; benefit.TransactionNumber = "1235"; benefit.ReferenceNumber = "1213"; benefit.SetDetailAggregate(aggregate); benefit.ReversalTransactionType = FdmsrcbenefitReversalTransactionTypes.frttSale; benefit.ReversalType = FdmsrcbenefitReversalTypes.frtFullReversal; benefit.Reverse();
.NET Standard Notes
To call this method in an asynchronous manner call ReverseAsync instead. When the method completes (or an error is encountered) the ReverseCompleted event will fire.