4D Payments SDK 2016 .NET Edition
4D Payments SDK 2016 .NET Edition
Questions / Feedback?

Reverse Method

Reverses a transaction.

Syntax

[VB.NET]
Public Sub Reverse()
[C#]
public void Reverse();

Remarks

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

Healthcare Sale and Reverse Example

healthcare.TPPID = "AAA000";
healthcare.MerchantTerminalNumber = "00000001";
healthcare.MerchantId = "1234";
healthcare.GroupId = "20001";
healthcare.DatawireId = "00011122233344455566";
healthcare.URL = "https://stg.dw.us.fdcnet.biz/rc";
healthcare.ApplicationId = "RAPIDCONNECTSRS";

healthcare.IndustryType = FdmsrchealthcareIndustryTypes.fhitRetail;

healthcare.STAN = "112";
healthcare.TransactionNumber = "1234";
healthcare.OrderNumber = "123";
healthcare.ReferenceNumber = "123";

healthcare.Card.MagneticStripe = "B4012000033330026^FDCS TEST CARD   /VISA^210410054321000000000000000  150  A";
healthcare.Card.EntryDataSource = EntryDataSources.edsTrack1;

healthcare.TransactionAmount = "1200";
healthcare.TotalMedicalAmount = "1200";
healthcare.PrescriptionAmount = "1200";

healthcare.Sale();

string aggregate = healthcare.GetDetailAggregate();

//Reverse    
healthcare = new Fdmsrchealthcare();
healthcare.TPPID = "AAA000";
healthcare.MerchantTerminalNumber = "00000001";
healthcare.MerchantId = "1234";
healthcare.GroupId = "20001";
healthcare.DatawireId = "00011122233344455566";
healthcare.URL = "https://stg.dw.us.fdcnet.biz/rc";
healthcare.ApplicationId = "RAPIDCONNECTSRS";

healthcare.STAN = "113";
healthcare.TransactionNumber = "1235";

healthcare.SetDetailAggregate(aggregate);

healthcare.ReversalTransactionType = FdmsrchealthcareReversalTransactionTypes.frttSale;
healthcare.ReversalType = FdmsrchealthcareReversalTypes.frtFullReversal;

healthcare.Reverse();

 
 
Copyright (c) 2020 4D Payments Inc. - All rights reserved.
4D Payments SDK 2016 .NET Edition - Version 16.0 [Build 7395]