Voids a transaction in the current batch.
A Void removes transactions from an open batch prior to settlement, to correct same-day transaction mistakes. A transaction can only be voided if it exists in the current open batch. To do so, call VoidTransaction with the PNRef parameter set to the PNRef of the original transaction. This only works for transactions that are still in the current open batch. If the batch that contained the target transaction has already been settled, you must use the Refund or Credit methods instead.
Note that since AuthOnly transactions are not added to the current batch, they cannot be voided. Examples follow.
component.Card = new GlobalCard("4444333322221111", 1, 2015); component.TransactionAmount = "1.00"; component.Sale(); refNumToVoid = component.Response.PNRef; ... more sale transactions ... // All that's needed for a void: component.VoidTransaction(refNumToVoid);
.NET Standard Notes
To call this method in an asynchronous manner call VoidTransactionAsync instead. When the method completes (or an error is encountered) the VoidTransactionCompleted event will fire.