This function should be called when the cash register application starts. By doing this, IPPOS connects the bank and updates the key.
Description of Response object
Request object | Purpose | Description |
request.operationCode | Operation number | Will send constant 26 |
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 = 26;
request.TerminalID = "13133707";
try
{
int res = dclink.InitResources();
if (res != 0)
{
Console.Write("Exception during InitResource: " + dclink.ErrorDescription);
}
else
{
res = dclink.Exchange(ref request, ref response, 5000000);
if (res != 0)
{
Console.Write("Exception during Exchange: " + dclink.ErrorDescription);
}
}
dclink.FreeResources();
if (response.Status == 1)
{
Console.Write("Successful");
}
else
{
Console.Write("Failed");
Console.WriteLine("Error reason:" + response.TextResponse);
}
}
catch (Exception e)
{
Console.Write("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. |