![]() |
IDTech iOS SDK Guide
1.1.151
API reference for NEO2
|
#import <IDTechEMV.h>
Instance Methods | |
(void) | - completeOnlineEMVTransaction:resultCode:issuerAuthenticationData:issuerScripts: |
(void) | - confirmApplication: |
(void) | - confirmApplicationCancel |
(NSDictionary *) | - getAllTags |
(NSString *) | - getEMVKernelVersion |
(NSString *) | - getBuildVersion |
(NSString *) | - getEMVKernelChecksum |
(NSString *) | - getEMVConfigurationChecksum |
(NSData *) | - getTag: |
(void) | - removeApplicationData: |
(NSArray *) | - retrieveAIDList |
(IDTech_ApplicationID) | - retrieveApplicationData: |
(IDTech_TerminalData) | - retrieveTerminalData |
(void) | - setApplicationData: |
(void) | - setTag:tagData: |
(void) | - preloadEMVCardData |
(void) | - setTerminalData: |
(void) | - cancelTransaction |
(void) | - startEMVTransaction:timeout:transactionType:additionalTags: |
(void) | - accelerateRead: |
(void) | - sendSystemError |
Class Methods | |
(IDTechEMV *) | + sharedController |
Properties | |
id< IDTechEMV_Delegate > | delegate |
Class to drive the IDTechEMV device
- (void) accelerateRead: | (BOOL) | enabled |
Accelerate Read Data
Enables multi-record reading from ICC to accellerate EMV transaction time. Enabled by default.
enabled | TRUE = use accelerated reading, FALSE = use standard reading |
- (void) cancelTransaction |
Cancel Transaction
Cancels the current transaction
- (void) completeOnlineEMVTransaction: | (EMV_COMPLETION_RESULT) | result | |
resultCode: | (NSString *) | rc | |
issuerAuthenticationData: | (NSString *) | iad | |
issuerScripts: | (NSString *) | scripts | |
Complete EMV Transaction Online Request
Completes an online EMV transaction request by the card
The tags will be returned in the emvTransactionData delegate protocol.
result | EMV_COMPLETION_RESULT: Used to specify if contacting online host was successful or other problem occurred |
rc | Result Code from host. Manditory. 2 characters ASCII value. Example "00" |
iad | Issuer Authentication Data. Optional. 10 bytes, 20 Hex Characters representing data. Example "11223344556677883030" |
scripts | Issuer Scripts. Optional. Data represented by Hex Characters. TLV Format. Must start with 71 or 72, followed by length, followed by data. Example "711000112233445566778899AABBCCDDEEFF". Can string multiple scripts, both 71 and 72. |
Results are returned on delegate protocol emvTransactionData.
- (void) confirmApplication: | (int) | index |
Set Application
During and EMV transaction flow, if there are multiple applications to chose from, or the terminal settings indicate cardholder confirmation for applicaiton selection, the delegate IDTechEMV_Delegate::confirmApplicationSelection:() will receive an array with all the available applications to choose from. The selected index of the application must be passed back to this method to continue the EMV transaction flow
index | The index of the selected app from the application array passed back from confirmApplicationSelection:() |
- (void) confirmApplicationCancel |
Cancel Set Application
During and EMV transaction flow, if there are multiple applications to chose from, or the terminal settings indicate cardholder confirmation for applicaiton selection, the delegate IDTechEMV_Delegate::confirmApplicationSelection:() will receive an array with all the available applications to choose from. If no application selection is performed, this routine must be called to cancel the transaction
- (NSDictionary*) getAllTags |
Get All Tags
Retrieves all EMV tags from the inserted card. Only available after the card has been processed after executing IDTechEMV::startEMVTransaction:timeout:additionalTags:()
- (NSString*) getBuildVersion |
Returns SDK EMV Build Version
- (NSString*) getEMVConfigurationChecksum |
Returns SDK EMV Configuration Version
- (NSString*) getEMVKernelChecksum |
Returns SDK EMV Kernel Checksum
- (NSString*) getEMVKernelVersion |
Returns SDK EMV Kernel Version
- (NSData*) getTag: | (NSString *) | tagName |
Get Tag
Retrieves an EMV tag from the inserted card. Only available after the card has been processed after executing IDTechEMV::startEMVTransaction:timeout:additionalTags:()
tagName | Name fo tag to retrieve |
- (void) preloadEMVCardData |
Preload EMV Card Data
This function will attempt to cache preliminary EMV card data. It is to be used in an envvironment where there will be a few seconds between inserting the card and executing the startEMV command. Example would be the idle time in collecting an amount before startEVM is executed.
- (void) removeApplicationData: | (NSString *) | AID |
Remove Application Data by AID
Removes the Application Data as specified by the AID name passed as a parameter
AID | Name of ApplicationID in ASCII, example "A0000000031020". Must be between 5 and 16 characters |
- (NSArray*) retrieveAIDList |
Retrieve AID list
Returns all the AID name/length on the inserted ICC. Populates response parameter with an dictionary with Keys of AID Names (NSData*), and values of AID Lengths (NSData*)
- (IDTech_ApplicationID) retrieveApplicationData: | (NSString *) | AID |
Retrieve Application Data by AID
Retrieves the Application Data as specified by the AID name passed as a parameter. The AID will be in the response parameter responseAID. If aidLen = 0, then requested AID was not found.
AID | Name of ApplicationID in ASCII, example "A0000000031020". Must be between 5 and 16 characters |
- (IDTech_TerminalData) retrieveTerminalData |
Retrieve Terminal Data
Retrieves the Terminal Data. The data will be in the response parameter
- (void) sendSystemError |
Send Sytem Error
For Internal Use Only
- (void) setApplicationData: | (IDTech_ApplicationID) | data |
Set Application Data by AID
Sets the Application Data as specified by the ApplicationID structure passed as a parameter
data | ApplicationID configuration file |
- (void) setTag: | (NSString *) | tagName | |
tagData: | (NSData *) | data | |
Set Tag
Sets an EMV tag from the tags read into the terminal. Only available after the card has been processed after executing IDTechEMV::startEMVTransaction:timeout:additionalTags:()
tagName | Name of tag to set |
data | Tag data |
- (void) setTerminalData: | (IDTech_TerminalData) | data |
Set Terminal Data
Sets the Terminal Data as specified by the IDTech_TerminalData structure passed as a parameter
data | TerminalData configuration file |
+ (IDTechEMV*) sharedController |
- (void) startEMVTransaction: | (float) | amount | |
timeout: | (int) | timeout | |
transactionType: | (int) | type | |
additionalTags: | (NSMutableDictionary *) | tags | |
Start EMV Transaction Request
Authorizes the EMV transaction amounts for an ICC card
The tags will be returned in the emvTransactionData delegate protocol.
amount | Transaction amount value (tag value 9F02) |
timeout | Timeout value in seconds. |
type | Transaction Type. |
tags | Any other optional tags to be included in the request. Passed as a mutable dictionary. |
EMV data is received in TLV (Tag, Length, value) format: 950500000080009B02E8009F2701018A025A339F26080C552B9364D55CE5
This data contains the following EMV tags/values:
Tag | Length | Value |
---|---|---|
95 | 05 | 0000008000 |
9B | 02 | E800 |
9F27 | 01 | 01 |
8A | 02 | 5A33 |
9F26 | 08 | 0C552B9364D55CE5 |
An example how to create an NSMutableDictionary with these values follows.
|
readwriteatomicstrong |