IDTech iOS Framework Guide  1.1.088
API reference for UniPay
IDT_UniPay Class Reference

#import <IDT_UniPay.h>

Inheritance diagram for IDT_UniPay:

Instance Methods

(RETURN_CODE) - config_getModelNumber:
 
(RETURN_CODE) - config_getSerialNumber:
 
(BOOL) - config_setCmdTimeOutDuration:
 
(RETURN_CODE) - config_setSerialNumber:
 
(RETURN_CODE) - device_cancelConnectToAudioReader
 
(RETURN_CODE) - device_connectToAudioReader
 
(RETURN_CODE) - device_getBatteryVoltage:
 
(RETURN_CODE) - device_getFirmwareVersion:
 
(RETURN_CODE) - device_getKSN:ksn:
 
(RETURN_CODE) - device_getLevelAndBaud:
 
(NSString *) - device_getResponseCodeString:
 
(BOOL) - device_isAudioReaderConnected
 
(bool) - device_isConnected:
 
(RETURN_CODE) - device_rebootDevice
 
(RETURN_CODE) - device_sendDataCommand:calcLRC:response:
 
(RETURN_CODE) - device_setAudioVolume:
 
(RETURN_CODE) - device_startRKI
 
(RETURN_CODE) - icc_exchangeAPDU:encrypted:response:
 
(RETURN_CODE) - icc_exchangeEncryptedAPDU:response:
 
(RETURN_CODE) - icc_exchangeMultiAPDU:response:
 
(RETURN_CODE) - icc_getAPDU_KSN:
 
(RETURN_CODE) - icc_getExpiryDateOption:
 
(RETURN_CODE) - icc_getICCReaderStatus:
 
(RETURN_CODE) - icc_getKeyFormatForICCDUKPT:
 
(RETURN_CODE) - icc_getKeyTypeForICCDUKPT:
 
(RETURN_CODE) - icc_powerOffICC:
 
(RETURN_CODE) - icc_powerOnICC:
 
(RETURN_CODE) - icc_setICCNotification:
 
(RETURN_CODE) - icc_setKeyFormatForICCDUKPT:
 
(RETURN_CODE) - icc_setKeyTypeForICCDUKPT:
 
(RETURN_CODE) - icc_loadDUKPTKey:ksn:initialKey:
 
(RETURN_CODE) - msr_cancelMSRSwipe
 
(RETURN_CODE) - msr_getClearPANID:
 
(RETURN_CODE) - msr_getExpirationMask:
 
(RETURN_CODE) - msr_getSwipeEncryption:
 
(RETURN_CODE) - msr_getSwipeForcedEncryptionOption:
 
(RETURN_CODE) - msr_getSwipeMaskOption:
 
(RETURN_CODE) - msr_setClearPANID:
 
(RETURN_CODE) - msr_setExpirationMask:
 
(RETURN_CODE) - msr_setSwipeEncryption:
 
(RETURN_CODE) - msr_setSwipeForcedEncryptionOption:track2:track3:track3card0:
 
(RETURN_CODE) - msr_setSwipeMaskOption:track2:track3:
 
(RETURN_CODE) - msr_startMSRSwipe:
 
(bool) - isConnected
 
(void) - attemptConnect
 

Class Methods

(NSString *) + SDK_version
 
(IDT_UniPay *) + sharedController
 

Properties

id< IDT_UniPay_Delegatedelegate
 

Detailed Description

Class to drive the IDT_UniPay device

Method Documentation

- (void) attemptConnect

Attempt connection

Requests a connection attempt. Internal use only.

- (RETURN_CODE) config_getModelNumber: (NSString **)  response

Polls device for Model Number

Parameters
responseReturns Model Number
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
- (RETURN_CODE) config_getSerialNumber: (NSString **)  response

Polls device for Serial Number

Parameters
responseReturns Serial Number
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
- (BOOL) config_setCmdTimeOutDuration: (float)  nSecond

Command Acknowledgement Timout

Sets the amount of seconds to wait for an {ACK} to a command before a timeout. Responses should normally be received under one second. Default is 3 seconds

Parameters
nSecondTimout value. Valid range .1 - 60 seconds
Returns
Success flag. Determines if value was set and in range.
- (RETURN_CODE) config_setSerialNumber: (NSString *)  strSN

Set Serial Number

Set device's serial number and Bluetooth name, then reboots device. Bluetooth name will be set as IDT_UniPay + Space + Serial number

Parameters
strSNDevice serial number
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
- (RETURN_CODE) device_cancelConnectToAudioReader

Cancel Connect To Audio Reader

Returns
RETURN_CODE

Cancels a connection attempt to an IDTech MSR device connected via the audio port.

- (RETURN_CODE) device_connectToAudioReader

Connect To Audio Reader

Returns
RETURN_CODE

Attemps to recognize and connect to an IDTech MSR device connected via the audio port.

- (RETURN_CODE) device_getBatteryVoltage: (NSString **)  response

Polls device for Battery Voltage

Parameters
responseReturns Battery Voltage as 4-chararacter string * 100. Example: "0186" = 1.86v. "1172" = 11.72v.
Returns
RETURN_CODE:
  • 0x0000: Success: no error - RETURN_CODE_DO_SUCCESS
  • 0x0001: Disconnect: no response from reader - RETURN_CODE_ERR_DISCONNECT
  • 0x0002: Invalid Response: invalid response data - RETURN_CODE_ERR_CMD_RESPONSE
  • 0x0003: Timeout: time out for task or CMD - RETURN_CODE_ERR_TIMEDOUT
  • 0x0004: Invalid Parameter: wrong parameter - RETURN_CODE_ERR_INVALID_PARAMETER
  • 0x0005: MSR Busy: SDK is doing MSR or ICC task - RETURN_CODE_SDK_BUSY_MSR
  • 0x0006: PINPad Busy: SDK is doing PINPad task - RETURN_CODE_SDK_BUSY_PINPAD
  • 0x0007: Unknown: Unknown error - RETURN_CODE_ERR_OTHER
  • 0x0100 through 0xFFFF refer to IDT_Device::getResponseCodeString:()
- (RETURN_CODE) device_getFirmwareVersion: (NSString **)  response

Polls device for Firmware Version

Parameters
responseResponse returned of Firmware Version
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
- (RETURN_CODE) device_getKSN: (int)  keySlot
ksn: (NSData **)  ksn 

Get Account KSN

Retrieves the KSN for a key slot

Parameters
keySlot0x02=MSR DUKPT Key, 0x0C = Admin DUKPT Key, 0x22 = ICC DUKPT Key
ksnReturns the Account DUKPT KSN
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE
  • If Key was not loaded, unit should respond error code 0x0400.
  • If Key is end of useful life, unit should respond error code 0x7300
- (RETURN_CODE) device_getLevelAndBaud: (NSString **)  response

Get Level and Baude

Parameters
responseThe Baud Rate and Audio Level.
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
  • 0x0100 through 0xFFFF refer to IDT_Device::getResponseCodeString:()
- (NSString *) device_getResponseCodeString: (int)  errorCode

Get Response Code String

Interpret a IDT_UniPay response code and return string description.

Parameters
errorCodeError code, range 0x0000 - 0xFFFF, example 0x0300
Returns
Verbose error description
HEX VALUE Description
0x0000 No error, beginning task
0x0001 No response from reader
0x0002 Invalid response data
0x0003 Time out for task or CMD
0x0004 Wrong parameter
0x0005 SDK is doing MSR or ICC task
0x0006 SDK is doing PINPad task
0x0007 SDK is doing Other task
0x0300 Key Type(TDES) of Session Key is not same as the related Master Key.
0x0400 Related Key was not loaded.
0x0500 Key Same.
0x0702 PAN is Error Key.
0x0D00 This Key had been loaded.
0x0E00 Base Time was loaded.
0x1800 Send “Cancel Command” after send “Get Encrypted PIN” &”Get Numeric “& “Get Amount”
0x1900 Press “Cancel” key after send “Get Encrypted PIN” &”Get Numeric “& “Get Amount”
0x30FF Security Chip is not connect
0x3000 Security Chip is deactivation & Device is In Removal Legally State.
0x3101 Security Chip is activation & Device is In Removal Legally State.
0x5500 No Admin DUKPT Key.
0x5501 Admin DUKPT Key STOP.
0x5502 Admin DUKPT Key KSN is Error.
0x5503 Get Authentication Code1 Failed.
0x5504 Validate Authentication Code Error.
0x5505 Encrypt or Decrypt data failed.
0x5506 Not Support the New Key Type.
0x5507 New Key Index is Error.
0x5508 Step Error.
0x550F Other Error.
0x6000 Save or Config Failed / Or Read Config Error.
0x6200 No Serial Number.
0x6900 Invalid Command - Protocol is right, but task ID is invalid.
0x6A00 Unsupported Command - Protocol and task ID are right, but command is invalid.
0x6B00 Unknown parameter in command - Protocol task ID and command are right, but parameter is invalid.
0x7200 Device is suspend (MKSK suspend or press password suspend).
0x7300 PIN DUKPT is STOP (21 bit 1).
0x7400 Device is Busy.
0xE100 Can not enter sleep mode.
0xE200 File has existed.
0xE300 File has not existed.
0xE400 Open File Error.
0xE500 SmartCard Error.
0xE600 Get MSR Card data is error.
0xE700 Command time out.
0xE800 File read or write is error.
0xE900 Active 1850 error!
0xEA00 Load bootloader error.
0xEF00 Protocol Error- STX or ETX or check error.
0xEB00 Picture is not exist.
0x2C06 no card seated to request ATR
0x2D01 Card Not Supported,
0x2D03 Card Not Supported, wants CRC
0x690D Command not supported on reader without ICC support
0x8100 ICC error time out on power-up
0x8200 invalid TS character received
0x8500 pps confirmation error
0x8600 Unsupported F, D, or combination of F and D
0x8700 protocol not supported EMV TD1 out of range
0x8800 power not at proper level
0x8900 ATR length too long
0x8B01 EMV invalid TA1 byte value
0x8B02 EMV TB1 required
0x8B03 EMV Unsupported TB1 only 00 allowed
0x8B04 EMV Card Error, invalid BWI or CWI
0x8B06 EMV TB2 not allowed in ATR
0x8B07 EMV TC2 out of range
0x8B08 EMV TC2 out of range
0x8B09 per EMV96 TA3 must be > 0xF
0x8B10 ICC error on power-up
0x8B11 EMV T=1 then TB3 required
0x8B12 Card Error, invalid BWI or CWI
0x8B13 Card Error, invalid BWI or CWI
0x8B17 EMV TC1/TB3 conflict*
0x8B20 EMV TD2 out of range must be T=1
0x8C00 TCK error
0xA304 connector has no voltage setting
0xA305 ICC error on power-up invalid (SBLK(IFSD) exchange
0xE301 ICC error after session star
0xFF00 EMV: Request to go online
0xFF01 EMV: Accept the offline transaction
0xFF02 EMV: Decline the offline transaction
0xFF03 EMV: Accept the online transaction
0xFF04 EMV: Decline the online transaction
0xFF05 EMV: Application may fallback to magstripe technology
0xFF06 EMV: ICC detected that the conditions of use are not satisfied
0xFF07 EMV: ICC didn't accept transaction
0xFF08 EMV: Transaction was cancelled
0xFF09 EMV: Application was not selected by kernel or ICC format error or ICC missing data error
0xFF0A EMV: Transaction is terminated
0xFF0B EMV: Other EMV Error
- (BOOL) device_isAudioReaderConnected

Is Audio Reader Connected

Returns value on device connection status when device is an audio-type connected to headphone plug.

Returns
BOOL True = Connected, False = Disconnected
- (bool) device_isConnected: (IDT_DEVICE_Types)  device

Is Device Connected

Returns the connection status of the requested device

Parameters
deviceCheck connectivity of device type
typedef enum{
IDT_DEVICE_UniPay_IOS = 3,
IDT_DEVICE_UniPay_OSX_USB = 4
}IDT_DEVICE_Types;
- (RETURN_CODE) device_rebootDevice

Reboot Device

Executes a command to restart the device.

Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
- (RETURN_CODE) device_sendDataCommand: (NSData *)  cmd
calcLRC: (BOOL)  lrc
response: (NSData **)  response 

Send a NSData object to device

Sends a command represented by the provide NSData object to the device through the accessory protocol.

Parameters
cmdNSData representation of command to execute
lrcIf TRUE, this will wrap command with start/length/lrc/sum/end: '{STX}{Len_Low}{Len_High} data {CheckLRC} {CheckSUM} {ETX}'
responseResponse data
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:)
- (RETURN_CODE) device_setAudioVolume: (float)  val

Set Volume To Audio Reader

Set the iPhone’s volume for command communication with audio-based readers. The the range of iPhone’s volume is from 0.1 to 1.0.

Parameters
valVolume level from 0.1 to 1.0
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
- (RETURN_CODE) device_startRKI

Start Remote Key Injection

Attempts to perform a Remote Key Injection with IDTech's RKI servers.

Returns
RETURN_CODE:
  • 0x0000: Success: no error - RETURN_CODE_DO_SUCCESS
  • 0x0001: Disconnect: no response from reader - RETURN_CODE_ERR_DISCONNECT
  • 0x0002: Invalid Response: invalid response data - RETURN_CODE_ERR_CMD_RESPONSE
  • 0x0003: Timeout: time out for task or CMD - RETURN_CODE_ERR_TIMEDOUT
  • 0x0004: Invalid Parameter: wrong parameter - RETURN_CODE_ERR_INVALID_PARAMETER
  • 0x0005: MSR Busy: SDK is doing MSR or ICC task - RETURN_CODE_SDK_BUSY_MSR
  • 0x0006: PINPad Busy: SDK is doing PINPad task - RETURN_CODE_SDK_BUSY_PINPAD
  • 0x0100 through 0xFFFF refer to IDT_Device::getResponseCodeString:()
- (RETURN_CODE) icc_exchangeAPDU: (NSData *)  dataAPDU
encrypted: (BOOL)  encrypted
response: (APDUResponse **)  response 

Exchange APDU

Sends an APDU packet to the ICC. If successful, response is returned in APDUResult class instance in response parameter.

Parameters
dataAPDUAPDU data packet
encryptedSend data encrypted for special case
responseUnencrypted/encrypted parsed APDU response
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:)
- (RETURN_CODE) icc_exchangeEncryptedAPDU: (NSData *)  dataAPDU
response: (APDUResponse **)  response 

Exchange Encrypted APDU

  • UniPay

    Sends an encrypted APDU packet to the ICC. If successful, response is returned in APDUResult class instance in response parameter.

Parameters
dataAPDUAPDU data packet
responseencrypted parsed APDU response
Returns
RETURN_CODE:
  • 0x0000: Success: no error - RETURN_CODE_DO_SUCCESS
  • 0x0001: Disconnect: no response from reader - RETURN_CODE_ERR_DISCONNECT
  • 0x0002: Invalid Response: invalid response data - RETURN_CODE_ERR_CMD_RESPONSE
  • 0x0003: Timeout: time out for task or CMD - RETURN_CODE_ERR_TIMEDOUT
  • 0x0004: Invalid Parameter: wrong parameter - RETURN_CODE_ERR_INVALID_PARAMETER
  • 0x0005: MSR Busy: SDK is doing MSR or ICC task - RETURN_CODE_SDK_BUSY_MSR
  • 0x0006: PINPad Busy: SDK is doing PINPad task - RETURN_CODE_SDK_BUSY_PINPAD
  • 0x0007: Unknown: Unknown error - RETURN_CODE_ERR_OTHER
  • 0x0100 through 0xFFFF refer to IDT_Device::getResponseCodeString:()
- (RETURN_CODE) icc_exchangeMultiAPDU: (NSArray *)  dataAPDU
response: (NSData **)  response 

Exchange Multi APDU

Sends multiple APDU commands within on command

Parameters
dataAPDUAn array of NSData APDU commands
responseThe combined response of the multiple APDU commands
Returns
RETURN_CODE:
  • 0x0000: Success: no error - RETURN_CODE_DO_SUCCESS
  • 0x0001: Disconnect: no response from reader - RETURN_CODE_ERR_DISCONNECT
  • 0x0002: Invalid Response: invalid response data - RETURN_CODE_ERR_CMD_RESPONSE
  • 0x0003: Timeout: time out for task or CMD - RETURN_CODE_ERR_TIMEDOUT
  • 0x0004: Invalid Parameter: wrong parameter - RETURN_CODE_ERR_INVALID_PARAMETER
  • 0x0005: MSR Busy: SDK is doing MSR or ICC task - RETURN_CODE_SDK_BUSY_MSR
  • 0x0006: PINPad Busy: SDK is doing PINPad task - RETURN_CODE_SDK_BUSY_PINPAD
  • 0x0007: Unknown: Unknown error - RETURN_CODE_ERR_OTHER
  • 0x0100 through 0xFFFF refer to IDT_Device::getResponseCodeString:()
- (RETURN_CODE) icc_getAPDU_KSN: (NSData **)  ksn

Get APDU KSN

Retrieves the KSN used in ICC Encypted APDU usage

Parameters
ksnReturns the encrypted APDU packet KSN
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE
- (RETURN_CODE) icc_getExpiryDateOption: (NSString **)  response

Get Expiry Date Option UniPay

Executes a command to get the Expiry Date Option.

Parameters
responseExpiry Option..
  • "0" Output masked for Tag 57 and only output encrypted for Tag 5F24
  • "1" Output plaintext
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
- (RETURN_CODE) icc_getICCReaderStatus: (ICCReaderStatus **)  readerStatus

Get Reader Status

Returns the reader status

Parameters
readerStatusPointer that will return with the ICCReaderStatus results.
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
ICCReaderStatus readerStatus;
RETURN_CODE rt = [[IDT_UniPay sharedController] icc_getICCReaderStatus:&readerStatus];
if(RETURN_CODE_DO_SUCCESS != rt){
LOGI(@"Fail");
}
else{
NSString *sta;
if(readerStatus.iccPower)
sta =@"[ICC Powered]";
else
sta = @"[ICC Power not Ready]";
if(readerStatus.cardSeated)
sta =[NSString stringWithFormat:@"%@,[Card Seated]", sta];
else
sta =[NSString stringWithFormat:@"%@,[Card not Seated]", sta];
LOGI(@"Card Status = %@",sta);
}
- (RETURN_CODE) icc_getKeyFormatForICCDUKPT: (NSString **)  response

Get Key Format For ICC DUKPT

Specifies how data will be encrypted with Data Key or PIN key (if DUKPT key loaded)

Parameters
responseResponse returned from method:
  • 'TDES': Encrypted card data with TDES if DUKPT Key had been loaded.(default)
  • 'AES': Encrypted card data with AES if DUKPT Key had been loaded.
  • 'NONE': No Encryption.
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
- (RETURN_CODE) icc_getKeyTypeForICCDUKPT: (NSString **)  response

Get Key Type for ICC DUKPT

Specifies the key type used for ICC DUKPT encryption

Parameters
responseResponse returned from method:
  • 'DATA': Encrypted card data with Data Key DUKPT Key had been loaded.(default)
  • 'PIN': Encrypted card data with PIN Key if DUKPT Key had been loaded.
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
- (RETURN_CODE) icc_loadDUKPTKey: (DUKPT_KEY_Type)  type
ksn: (NSString *)  hexKSN
initialKey: (NSString *)  hexInitKey 

Loads the ICC DUKPT Key

Sets the key the data will be encrypted with

Parameters
typeKey Type
  • DUKPT_KEY_MSR = 0x00,
  • DUKPT_KEY_ICC = 0x01,
  • DUKPT_KEY_Admin = 0x10,
  • DUKPT_KEY_Paireing_PinPad = 0x20,
hexKSNKey Serial Number as a Hex string
hexInitKeyInitial key as a Hex string
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:)
- (RETURN_CODE) icc_powerOffICC: (NSString **)  error

Power Off ICC

Powers down the ICC

Parameters
errorReturns the error, if any
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:

If Success, empty If Failure, ASCII encoded data of error string

- (RETURN_CODE) icc_powerOnICC: (NSData **)  response

Power On ICC

Power up the currently selected microprocessor card in the ICC reader

Parameters
responseResponse returned. If Success, ATR String. If Failure, ASCII encoded data of error string
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
- (RETURN_CODE) icc_setICCNotification: (BOOL)  turnON

Set ICC Notifications

Determins if card insert/remove events are captured and sent to delegate UniPay_EventFunctionICC

Parameters
turnONTRUE = monitor ICC card events, FALSE = ignore ICC card events. Default value is FALSE/OFF.
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
- (RETURN_CODE) icc_setKeyFormatForICCDUKPT: (int)  encryption

Set Key Format for ICC DUKPT

Sets how data will be encrypted, with either TDES or AES (if DUKPT key loaded)

Parameters
encryptionEncryption Type
  • 00: Encrypt with TDES
  • 01: Encrypt with AES
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
- (RETURN_CODE) icc_setKeyTypeForICCDUKPT: (int)  encryption

Set Key Type for ICC DUKPT Key

Sets which key the data will be encrypted with, with either Data Key or PIN key (if DUKPT key loaded)

Parameters
encryptionEncryption Type
  • 00: Encrypt with Data Key
  • 01: Encrypt with PIN Key
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:)
- (bool) isConnected

Device Connected

Returns
isConnected Boolean indicated if UniPay is connected
- (RETURN_CODE) msr_cancelMSRSwipe

Disable MSR Swipe

Cancels MSR swipe request.

Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
- (RETURN_CODE) msr_getClearPANID: (NSString **)  response

Get Clear PAN Digits

Returns the number of digits that begin the PAN that will be in the clear

Parameters
responseNumber of digits in clear. Values are ASCII '0' - '6':
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
- (RETURN_CODE) msr_getExpirationMask: (NSString **)  response

Get Expiration Masking

Get the flag that determines if to mask the expiration date

Parameters
response'0' = masked, '1' = not-masked
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
- (RETURN_CODE) msr_getSwipeEncryption: (NSString **)  response

Get Swipe Data Encryption

Returns the encryption used for sweip data

Parameters
response'TDES', 'AES', 'NONE'
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
- (RETURN_CODE) msr_getSwipeForcedEncryptionOption: (NSString **)  response

Get Swipe Data Encryption

Gets the swipe force encryption options

Parameters
responseA string with for flags separated by PIPE character f1|f2|f3|f4, example "1|0|0|1" where:
  • f1 = Track 1 Force Encrypt
  • f2 = Track 2 Force Encrypt
  • f3 = Track 3 Force Encrypt
  • f4 = Track 3 Force Encrypt when card type is 0
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
- (RETURN_CODE) msr_getSwipeMaskOption: (NSString **)  response

Get Swipe Mask Option

Gets the swipe mask/clear data sending option

Parameters
responseA string with for flags separated by PIPE character f1|f2|f3, example "1|0|0" where:
  • f1 = Track 1 Mask Allowed
  • f2 = Track 2 Mask Allowed
  • f3 = Track 3 Mask Allowed
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
- (RETURN_CODE) msr_setClearPANID: (int)  digits

Set Clear PAN Digits

Sets the amount of digits shown in the clear (not masked) at the beginning of the returned PAN value

Parameters
digitsNumber of digits to show in clear. Range 0-6.
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
- (RETURN_CODE) msr_setExpirationMask: (BOOL)  masked

Set Expiration Masking

Sets the flag to mask the expiration date

Parameters
maskedTRUE = mask expiration
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
- (RETURN_CODE) msr_setSwipeEncryption: (int)  encryption

Set Swipe Data Encryption

Sets the swipe encryption method

Parameters
encryption1 = TDES, 2 = AES
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
- (RETURN_CODE) msr_setSwipeForcedEncryptionOption: (BOOL)  track1
track2: (BOOL)  track2
track3: (BOOL)  track3
track3card0: (BOOL)  track3card0 

Set Swipe Force Encryption

Sets the swipe force encryption options

Parameters
track1Force encrypt track 1
track2Force encrypt track 2
track3Force encrypt track 3
track3card0Force encrypt track 3 when card type is 0
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
- (RETURN_CODE) msr_setSwipeMaskOption: (BOOL)  track1
track2: (BOOL)  track2
track3: (BOOL)  track3 

Set Swipe Mask Option

Sets the swipe mask/clear data sending option

Parameters
track1Mask track 1 allowed
track2Mask track 2 allowed
track3Mask track 3 allowed
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
- (RETURN_CODE) msr_startMSRSwipe: (int)  track

Enable MSR Swipe

Enables MSR, waiting for swipe to occur. Allows track selection. Returns IDTMSRData instance to deviceDelegate::swipeMSRData:()

Parameters
trackTrack Selection Option
Track Selection Option Val
Any Track 0
Track 1 Only 1
Track 2 Only 2
Track 1 & Track 2 3
Track 3 Only 4
Track 1 & Track 3 5
Track 2 & Track 3 6
All three Tracks 7
Returns
RETURN_CODE: Return codes listed as typedef enum in IDTCommon:RETURN_CODE. Values can be parsed with device_getResponseCodeString:
+ (NSString*) SDK_version

SDK Version

  • All Devices

Returns the current version of IDTech.framework

Returns
Framework version
+ (IDT_UniPay*) sharedController

Singleton Instance

  • All Devices

Establishes an singleton instance of IDT_UniPay class.

Returns
Instance of IDT_UniPay

Property Documentation

- (id< IDT_UniPay_Delegate >) delegate
readwriteatomicstrong

The documentation for this class was generated from the following file: