IDTech iOS/OSX SDK Guide  1.1.052
API reference for BTPay 200
 All Data Structures Functions Variables Properties Pages
IDT_BTPay.h
1 //
2 // IDT_BTPay.h
3 // IDTech
4 //
5 // Created by Randy Palermo on 7/2/14.
6 // Copyright (c) 2014 IDTech Products. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 #import "IDTCommon.h"
11 #import "IDTMSRData.h"
12 #import "APDUResponse.h"
13 #import "IDT_Device.h"
14 #import "IDTEMVData.h"
15 
16 
17 
19 @protocol IDT_BTPay_Delegate <NSObject>
20 
21 @optional
22 -(void) deviceConnected;
23 -(void) deviceDisconnected;
24 - (void) dataInOutMonitor:(NSData*)data incoming:(BOOL)isIncoming;
25 
30 - (void) swipeMSRData:(IDTMSRData*)cardData;
31 
45 - (void) emvTransactionData:(IDTEMVData*)emvData errorCode:(int)error;
46 
47 
48 
49 
74 - (void) pinpadData:(NSData*)value keySN:(NSData*)KSN event:(EVENT_PINPAD_Types)event;
75 
76 
77 @end
78 
79 
83 @interface IDT_BTPay : NSObject <IDT_Device_Delegate>{
84  id<IDT_BTPay_Delegate> delegate;
85 }
86 
87 @property(strong) id<IDT_BTPay_Delegate> delegate;
88 
89 
90 
98 +(NSString*) SDK_version;
99 
107 +(IDT_BTPay*) sharedController;
108 
118 +(void) connectUSB:(BOOL)isUSB;
119 
139 -(RETURN_CODE) config_getDateTime:(NSString**)response;
140 
141 
142 
153 -(RETURN_CODE) config_getInterfaceDeviceSN:(NSString**)response;
154 
169 -(RETURN_CODE) config_getLanguageType:(NSUInteger**)response;
181 -(RETURN_CODE) device_getMaskAndEncryption:(MaskAndEncryption**)data;
182 
191 -(RETURN_CODE) config_getModelNumber:(NSString**)response;
192 
202 -(RETURN_CODE) config_getSerialNumber:(NSString**)response;
203 
213 -(RETURN_CODE) config_getTerminalIdentification:(NSString**)response;
214 
227 -(RETURN_CODE) config_setBluetoothAddress:(NSString*)address;
228 
229 
230 
240 -(BOOL) config_setCmdTimeOutDuration: (int) nSecond;
241 
252 -(RETURN_CODE) config_setDateTime:(NSString*)date;
253 
254 
266 -(RETURN_CODE) config_setInterfaceDeviceSN:(NSString*)sn;
267 
282 -(RETURN_CODE) config_setLanguageType:(LANGUAGE_TYPE)lang;
294 -(RETURN_CODE) config_setSerialNumber:(NSString*)strSN;
295 
296 
297 
298 
310 -(RETURN_CODE) config_setTerminalIdentification:(NSString*)sn;
311 
312 
313 
314 
322 -(void) config_stayConnected:(BOOL)stayConnected;
323 
324 
325 
326 
327 
328 
329 
330 
331 
340 -(RETURN_CODE) device_getFirmwareVersion:(NSString**)response;
341 
342 
343 
344 
450 -(NSString *) device_getResponseCodeString: (int) errorCode;
451 
467 -(bool) device_isConnected:(IDT_DEVICE_Types)device;
468 
469 
489 -(RETURN_CODE) device_sendBeep:(unsigned short*)beep numberOfTones:(int)num;
490 
491 
492 
493 
505 -(RETURN_CODE) device_sendDataCommand:(NSData*)cmd calcLRC:(BOOL)lrc response:(NSData**)response;
506 
517 -(RETURN_CODE) device_restoreMaskAndEncryptionDefaults;
518 
519 
520 
521 
522 
535 -(RETURN_CODE) device_setExpMasking:(BOOL)mask;
536 
537 
538 
539 
540 
553 -(RETURN_CODE) device_setPANMaskingCharacter:(char)maskChar;
566 -(RETURN_CODE) device_setPostPANClearDigits:(int)clearDigits;
567 
580 -(RETURN_CODE) device_setPrePANClearDigits:(int)clearDigits;
581 
582 
594 -(RETURN_CODE) device_rebootDevice;
595 
606 -(RETURN_CODE) device_uploadJPEG:(NSData*)picture;
667 -(RETURN_CODE) emv_completeOnlineEMVTransaction:(EMV_AUTHORIZATION_RESULT)result hostResponseTags:(NSMutableDictionary *)tags responseTags:(IDTEMVData**)response;
668 
669 
679 -(RETURN_CODE) emv_getEMVKernelVersion:(NSString**)response;
680 
692 -(RETURN_CODE) emv_getAllTags:(NSDictionary**)data;
693 
694 
707 -(RETURN_CODE) emv_getTag:(NSString*)tagName tagData:(NSData**)data;
718 -(RETURN_CODE) emv_removeApplicationData:(NSString*)AID;
719 
731 -(RETURN_CODE) emv_removeCAPK:(NSString*)rid index:(NSString*)index ;
732 
733 
734 
735 
746 -(RETURN_CODE) emv_removeCRL:(CRLEntry)key;
747 
758 -(RETURN_CODE) emv_removeCRLUnit:(CRLEntry)key;
759 
768 -(RETURN_CODE) emv_removeTerminalData;
769 
780 -(RETURN_CODE) emv_retrieveAIDList:(NSArray**)response;
781 
782 
796 -(RETURN_CODE) emv_retrieveApplicationData:(NSString*)AID response:(ApplicationID**)responseAID;
797 
811 -(RETURN_CODE) emv_retrieveCAPK:(NSString*)rid index:(NSString*)index response:(CAKey**)response;
812 
813 
814 
815 
826 -(RETURN_CODE) emv_retrieveCAPKList:(NSArray**)response;
827 
853 -(RETURN_CODE) emv_retrieveCRLForRID:(NSString*)rid response:(NSArray**)response;
854 
863 -(RETURN_CODE) emv_retrieveCRLList:(NSMutableArray**)response;
864 
865 
866 
867 
868 
869 
881 -(RETURN_CODE) emv_retrieveTerminalData:(TerminalData**)response;
882 
883 
884 
885 
886 
887 
888 
889 
890 
891 
892 
903 -(RETURN_CODE) emv_setApplicationData:(ApplicationID)data;
904 
915 -(RETURN_CODE) emv_setCAPK:(CAKey)key;
916 
927 -(RETURN_CODE) emv_setCRL:(CRLEntry)key;
928 
929 
930 
931 
942 -(RETURN_CODE) emv_setTerminalData:(TerminalData)data;
943 
944 
945 
1004 -(RETURN_CODE) emv_startEMVTransaction:(float)amount otherAmount:(float)amtOther timeout:(int)timeout transactionType:(unsigned char)type additionalTags:(NSMutableDictionary *)tags;
1005 
1006 
1007 
1008 
1009 
1010 
1011 
1012 
1027 -(RETURN_CODE) icc_exchangeAPDU:(NSData*)dataAPDU response:(APDUResponse**)response;
1028 
1044 -(RETURN_CODE) icc_exchangeEncryptedAPDU:(NSData*)dataAPDU ksn:(NSData*)ksn response:(APDUResponse**)response;
1045 
1046 
1058 -(RETURN_CODE) icc_getAPDU_KSN:(NSData**)ksn;
1059 
1091 -(RETURN_CODE) icc_getICCReaderStatus:(ICCReaderStatus**)readerStatus;
1092 
1106 -(RETURN_CODE) icc_powerOffICC:(NSString**)error;
1107 
1108 
1123 -(RETURN_CODE) icc_powerOnICC:(NSData**)response;
1124 
1139 -(RETURN_CODE) icc_powerOnICC:(PowerOnStructure)options response:(NSData**)response;
1140 
1141 
1142 
1143 
1144 
1145 
1146 
1160 -(RETURN_CODE) lcd_showJPEG:(int)X0 Y0:(int)Y0 X1:(int)X1 Y1:(int)Y1;
1161 
1162 
1177 -(RETURN_CODE) lcd_displayMessage:(NSString*)line1 line2:(NSString*)line2 line3:(NSString*)line3 line4:(NSString*)line4;
1178 
1179 
1189 -(RETURN_CODE) lcd_enterSleepMode;
1201 -(RETURN_CODE) lcd_setIdleTimeForSleep: (int) seconds;
1202 
1203 
1204 
1205 
1214 -(RETURN_CODE) msr_cancelMSRSwipe;
1215 
1216 
1217 
1218 
1232 -(RETURN_CODE) msr_getCardDataEncryptedAlgorithm:(NSString**)response;
1233 
1234 
1248 -(RETURN_CODE) msr_getEncryptMSRFormat:(NSString**)response;
1249 
1250 
1266 -(RETURN_CODE) msr_setCardDataEncryptedAlgorithm:(int)encryption;
1267 
1283 -(RETURN_CODE) msr_setEncryptMSRFormat:(int)encryption;
1284 
1285 
1304 -(RETURN_CODE) msr_startMSRSwipeWithDisplay:(NSString*)line1 line2:(NSString*)line2 line3:(NSString*)line3;
1305 
1306 
1307 
1308 
1309 
1310 
1311 
1312 
1313 
1314 
1320 -(RETURN_CODE) pin_cancelPin;
1321 
1322 
1446 -(RETURN_CODE) pin_getAmount:(int)minLength maxLength:(int)maxLength messageID:(int)mID language:(LANGUAGE_TYPE)lang;
1447 
1448 
1470 -(RETURN_CODE) pin_getCardAccount:(int)minLength max:(int)maxLength line1:(NSString*)line1 line2:(NSString*)line2;
1471 
1472 
1492 -(RETURN_CODE) pin_getFunctionKey;
1493 
1516 -(RETURN_CODE) pin_getPinLength:(NSData**)response;
1517 
1544 -(RETURN_CODE) pin_getPINpadStatus:(NSData**)response;
1545 
1546 
1547 
1548 
1675 -(RETURN_CODE) pin_getEncryptedData:(BOOL)lastPackage minLength:(int)minLength maxLength:(int)maxLength messageID:(int)mID language:(LANGUAGE_TYPE)lang;
1676 
1704 -(RETURN_CODE) pin_getEncryptedPIN:(NSString*)account keyType:(PIN_KEY_Types)type line1:(NSString*)line1 line2:(NSString*)line2 line3:(NSString*)line3;
1705 
1830 -(RETURN_CODE) pin_getNumeric:(bool)maskInput minLength:(int)minLength maxLength:(int)maxLength messageID:(int)mID language:(LANGUAGE_TYPE)lang;
1831 
1832 
1833 
1834 
1835 
1847 -(RETURN_CODE) pin_setPinLength:(int)minLength maxLength:(int)maxLength;
1848 
1849 
1850 
1855 -(void) close;
1859 -(bool) isConnected;
1860 
1866 -(void) attemptConnect;
1867 
1868 @end
void deviceDisconnected()
Fires when device disconnects.
Definition: IDTMSRData.h:36
Definition: IDTCommon.h:164
Definition: APDUResponse.h:14
Definition: IDT_BTPay.h:19
Definition: IDTCommon.h:14
Definition: IDTCommon.h:43
void deviceConnected()
Fires when device connects. If a connection is established before the delegate is established (no del...
Definition: IDTCommon.h:67
Definition: IDTCommon.h:132
Definition: IDT_BTPay.h:83
Definition: IDTCommon.h:26
Definition: IDTCommon.h:93
id< IDT_BTPay_Delegate > delegate
Definition: IDT_BTPay.h:84
Definition: IDTEMVData.h:16