Refunds of transactions from the customer's card.
Description of Response object
Request object | Purpose | Description |
request.operationCode | Operation number | Will send constant 4 |
request.TerminalID | Terminal ID | IPPOS terminal ID given by the bank. Each cash register has a different terminal ID. |
request.Amount | Transaction amount | Transaction amount. The last 2 digits are fractions. |
request.CurrencyCode | Currency | Will send constant 496. |
C# Sample code
DualConnector.DCLink dclink = new DualConnector.DCLink();
DualConnector.ISAPacket request = new DualConnector.SAPacket();
DualConnector.ISAPacket response = new DualConnector.SAPacket();
request.OperationCode = 4;
request.TerminalID = "13133707";
request.Amount = "20000";
request.CurrencyCode = "496";
try
{
int res = dclink.InitResources();
if (res != 0)
{
Console.WriteLine("Exception during InitResource: " + dclink.ErrorDescription);
}
else
{
res = dclink.Exchange(ref request, ref response, 5000000);
if (res != 0)
{
Console.WriteLine("Exception during DCExchange: " + dclink.ErrorDescription);
}
}
dclink.FreeResources();
if (response.Status == 1)
{
Console.WriteLine("Cancellation Successful");
}
else
{
Console.WriteLine("Cancellation Failed");
Console.WriteLine("Error reason:" + response.TextResponse);
}
}
catch (Exception e)
{
Console.WriteLine("Exception during DualConnector: " + e.Message);
}
Console.ReadKey();
Description of the Response object
Response object | Purpose | Description |
response.status | Transaction status | Response code of 1 is considered transaction is successful. If the response code is anything else, the transaction is considered unsuccessful. |
response.TextResponse | Error description | Contains an error description when the operation fails. |