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

VoidTransaction Method

Voids a transaction in the current batch.

Syntax

procedure VoidTransaction(RetrievalNumberToVoid: String; LastRetrievalNumber: String);

Remarks

This method voids a previously authorized transaction. A transaction can only be voided if it exists in the current open batch. If the batch that contained the target transaction has already been released (settled), you must use the Credit method instead.

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

Before sending a void, you must make sure that the CardNumber property contains the card number from the original transaction. Also note that since AuthOnly transactions are not added to the current batch, they cannot be voided. Examples follow.


component.CardNumber = "4444333322221111"
component.CardExpMonth = 1
component.CardExpYear = 2010
component.TransactionAmount = "1.00"
component.Sale()

cnumToVoid = component.CardNumber
refNumToVoid = component.ResponseRetrievalNumber

...  more sale transactions ...

'All that's needed for a void:
component.CardNumber = cnumToVoid 
component.VoidTransaction(refNumToVoid, "") 

Note that 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: This method is not available when using the Terminal Capture SettlementMode.

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