VivaWalletPOS.newRefund Method

A new sale refund is formed by means of this function. A success or failure message is returned after the transaction is transmitted to the POS Terminal. 
This function does not conclude the refund process. The process involves the refund being transmitted to the POS Terminal for the user's confirmation. To check if the refund is completed or not, use the checkSession method. 
This function is not available in the Trial Version.
Public Function newRefund( _ 
ByVal refund As RefundTransaction
) As String
This language is not supported or no code example is available.
public string newRefund( 
RefundTransaction refund 
)
This language is not supported or no code example is available.

Parameters

refund
RefundTransaction

The refund that is going to be send to the POS Terminal, type of RefundTransaction

Return Value

string

"200 - The refund transaction was sent to the POS" or 
"999 - The transaction failed to be sent to the POS"

Example
 
 VivaWalletPOS vw = new VivaWalletPOS("Arbitrans User", "Arbitrans Key", "ClientID", "ClientSecret", false);
 
 RefundTransaction tra = vw.NewRefundTransaction();
 tra.sessionID = "my custom and unique Session ID";
 tra.terminalID = "123456";
 tra.cashRegisterID = "transaction without cash register";
 tra.parentSessionID = "the original Session ID";
 tra.amount = 10.0d;
 tra.currencyCode = "978"; // The ISO Code for EUR
 tra.merchantReference = "Refund - Invoice 123456";
 tra.customerTrns = "Refund - Invoice 123456";
 
 string refund = vw.newRefund(tra);
 					
This language is not supported or no code example is available.
 Dim vw As VivaWalletPOS = New VivaWalletPOS("Arbitrans User", "Arbitrans Key", "ClientID", "ClientSecret", False)
 
 Dim tra As RefundTransaction = vw.NewRefundTransaction()
 tra.sessionID = "my custom and unique Session ID"
 tra.terminalID = "123456"
 tra.cashRegisterID = "transaction without cash register"
 tra.parentSessionID = "the original Session ID"
 tra.amount = 10.0
 tra.currencyCode = "978" 'The ISO Code for EUR
 tra.merchantReference = "Refund - Invoice 123456"
 tra.customerTrns = "Refund - Invoice 123456"
 
 Dim refund As String = vw.newRefund(tra)
 					
This language is not supported or no code example is available.

.NET Framework

Supported in: 3.5 or newer

In this article

Definition