AuthenticateDevice Method
Authenticates a POS terminal.
Syntax
[VB.NET] Public Sub AuthenticateDevice()
[C#] public void AuthenticateDevice();
Remarks
AuthenticateDevice authenticates a POS device with TSYS. After a device is authenticated GenKey will hold a unique value that should be included in all future transaction requests from the terminal. Before calling this method an AuthenticationCode must be obtained from TSYS.
The following Merchant fields are applicable when calling this method:
- BankId
- CategoryCode
- CountryCode
- CurrencyCode
- Language
- Number
- ServicePhone
- StoreNumber
- TerminalNumber
- TimeZone
- Zip
After calling this method check Code to determine if the authentication succeeded. If the authentication succeeded Code will be "A1" and GenKey will be populated. If authentication failed Code will be "A2".
In addition to GenKey the following Response fields are populated:
AuthenticateDevice Example:TSYSTerminalMgr1.Merchant.BankId = "999999"; TSYSTerminalMgr1.Merchant.CategoryCode = "9999"; TSYSTerminalMgr1.Merchant.Name = "TESTMERCHANT"; TSYSTerminalMgr1.Merchant.Number = "888000002447"; TSYSTerminalMgr1.Merchant.StoreNumber = "5999"; TSYSTerminalMgr1.Merchant.TerminalNumber = "1234"; TSYSTerminalMgr1.Merchant.Zip = "27516"; TSYSTerminalMgr1.Merchant.ServicePhone = "6023337807"; TSYSTerminalMgr1.TransactionNumber = 1234; TSYSTerminalMgr1.AuthenticationCode = "N123456789"; TSYSTerminalMgr1.AuthenticateDevice(); string genkey = ""; if (TSYSTerminalMgr1.Response.Code == "A1") //approved genkey = TSYSTerminalMgr1.GenKey;