Direct Payment Integrator V6 - Online Help
Direct Payment Integrator V6
Questions / Feedback?

VoidTransaction Method

Voids a transaction in the current batch.

Syntax

[VB.NET]
Public Sub VoidTransaction(ByVal RetrievalNumberToVoid As String, ByVal LastRetrievalNumber As String)
[C#]
public void VoidTransaction(string retrievalNumberToVoid, string lastRetrievalNumber);

Remarks

A stored value Void transaction allows the removal of a transaction from the open batch in the terminal. The void will communicate to the stored value host so that the host can reverse the requested stored value transaction.

The VoidTransaction method has two parameters, RetrievalNumberToVoid and LastRetrievalNumber. RetrievalNumberToVoid is the RetrievalNumber of the transaction you wish to void. LastRetrievalNumber should be set to the last RetrievalNumber received from the Paymentech Server. If LastRetrievalNumber is left blank, the contents of the RetrievalNumber field will be used instead.

Before sending a void, you must make sure that the Number field contains the card number from the original transaction. For example:


component.Card = new CCCard("4444333322221111", 1, 2010);
component.TransactionAmount = "1.00";
component.RedeemCard();

cnumToVoid = component.Card.CardNumber;
refNumToVoid = component.Response.RetrievalNumber;

...  more sale transactions ...

'All that's needed for a void:
component.Card = new CCCard(cnumToVoid, -1, -1); // Expiration date will be ignored
component.SequenceNumber++;
component.VoidTransaction(refNumToVoid, component.Response.RetrievalNumber);

In the above void, if you use a new instance of the component or otherwise reset it's state, you must set the LastRetrievalNumber parameter as well.

Note: Voids cannot be performed on BalanceInquiry or Forced transactions.

NOTE: This method has a corresponding asynchronous version (VoidTransactionAsync) for use in the WinRT environment.

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 6.0.6240.0