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

VoidTransaction Method

Voids a transaction in the current batch.

Syntax

[VB.NET]
Public Sub VoidTransaction(ByVal PNRef As String)
[C#]
public void VoidTransaction(string PNRef);

Remarks

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

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