QPOS-iOS-SDK-Userguid-en-detail
QPOS-iOS-SDK-Userguid-en-detail
QPOS SDK
Integration Guide
:
Document Version <2.7>
Copyright notification
Reproduction in whole or in part is prohibited without the prior written consent of the
copyright owner. The information presented in this document does not form part of any
quotation or contract, is believed to be accurate and reliable and may be changed without
www.dspread.com
2
www.dspread.com
3
Table
1 INTRODUCTION........................................................................................................................ 8
www.dspread.com
4
www.dspread.com
5
www.dspread.com
6
www.dspread.com
7
www.dspread.com
8
1 Introduction
1.1 Summary
QPOS is a mobile payment card reader device with pinpad that works with mobile devices such as
smart phone. It provides merchants and consumers a safe and convenient way to make mobile
payments. QPOS can communicate with the mobile device through many methods, such as: audio
jack, Bluetooth and USB cable.
www.dspread.com
9
QPOS Reader is another mobile payment card reader device without pinpad. QPOS Reader can
communicate with the mobile device through audio jack or USB cable.
SPOS is a yet another mobile payment card reader device with pinpad and touch screen, SPOS can
communicate with the mobile device through many methods, such as: audio jack, Bluetooth and
USB cable. The touch screen can be used to capture the signature of consumer in an electronic
way.
QPOS share a lot in common, the SDK API is almost same for QPOS. In the following chapters.
Features:
⚫ Ensure secure transactions: integrated keyboard and multiple encryption algorithms to
ensure secure transactions.
⚫ Accept all types of bank card: supports magnetic stripe card, contact EMV IC card and
contactless EMV IC card.
⚫ Adapts to more smart devices through audio jack: Supports over 2,000 smart devices
through audio jack.
⚫ Fulfill global standards: EMV L1&L2, PCI PTS and more.
⚫ Supports all types of mobile systems: Such as iOS, Android, Windows phone and PC
OS.
This document is to help readers to integrate QPOS SDK into their mobile payment APPs.
www.dspread.com
10
This document is to describe the APIs of QPOS iOS SDK . The goal of SDK is to
communicate between the smart device and QPOS.
The readers of the document are those who plans to use QPOS SDK in their application.
www.dspread.com
11
Unless otherwise specified, Triple DES encryption with EBC and DUKPT key management
are assumed. DUKPT is specified in ANSI X9.24 part 1.
Refer to
http://en.wikipedia.org/wiki/DUKPT#Key_Register_.2832_hexadecimal_digits.29
In the Demo, the default transaction keys refer to the following table.
Key Name Default Length(Bytes)
KSN 00000332100300e00001 20
BDK 0123456789ABCDEFFEDCBA9876543210 32
EMVCo has approved QPOS application EMVCo type for Terminal level 2. QPOS
application is based on the requirements stated in the EMV 4.3 specification.
Messages within data communication protocols between the mobile payment application and
QPOS EMV kernel are encoded as a BER-TLV (Basic Encoding Rules-Tag-Length-Value)
which is defined in EMV 4.3 book3 Annex B.
www.dspread.com
12
QPOS Bluetooth ID is combined by ‘QPOS’ strings and the last-10 numbers of the label.
For example:
QPOS_ID := 12070002000200100151
QPOS_BT_ID := QPOS0200100151
www.dspread.com
13
www.dspread.com
14
www.dspread.com
15
CONSTRUCTOR
SETTING
FUNCTIONS
LISTENER CORE
COMMUNICATION
AUDIO MODULATION
iOS
www.dspread.com
16
The library needs several frameworks to be included into the XCode project for
a successful compilation:
AudioToolbox.framework
CoreBluetooth.framework
AVFoundation.framework
With iOS SDK, developer has two ways to communicate with QPOS, audiojack or Bluetooth.
www.dspread.com
17
getQposId
Get the config
getQposInfo information from onQposInfoResult
Qpos
www.dspread.com
18
www.dspread.com
19
The controller has a public member delegate that must be set with an object that Implements
the protocol QPOSServiceListener. This delegate handles different asynchronous events
that occur during the operation of the QPOS.
The developer must design a class that implements the interface and assign it to the delegate
member.
www.dspread.com
20
m
onRequestFinalConfirm Finally confirm before m finalConfirm
generating the AC by the
ICC COS
www.dspread.com
21
From the return of ‘onDoTradeResult’, the APP can find out whether consumer use an EMV ICC
card or a magnetic card.
www.dspread.com
22
www.dspread.com
23
www.dspread.com
24
Step 1: A transaction amount is needed for a payment transaction and it to be entered by the
operator (or calculated by the inventory system) regardless of whether magnetic stripe card or
EMV card. The onRequestSetAmount delegate method is triggered.
The APP should prompt the operator to enter the amount and then call the setAmount to send the
data back to EMV kernel.
The APP should prompt the user to select one application and then call the selectEmvApp
method.
www.dspread.com
25
Some applications (e.g. for small amount payment) does not require CVM (Cardholder
Verification Method) and this step is skipped. But it is also possible that the EMV card decline a
transaction without PIN. The customer/operator can press the cancel key on the keypad of QPOS
to cancel the PIN entry and abort.
www.dspread.com
26
The APP should prompt the user for a confirmation to proceed. This gives the user a chance to
review the amount, the payment method, etc.
A final confirmation is sent to EMV kernel by calling this :
The parameter TLV contains the tag-length-value data structure returned by the EMV kernel.
After that, the client APP should send the data to the payment operator. When the processing
results are returned from the payment operator, it should send the results back to EMV kernel by
sendOnlineProcessResult.
The data elements that are required are payment operator and issuer dependent. See chapter 1.9
and the EVM Book 3 Annex A for the full list of tags and the TLV structure.
The following tags are usually required but are ICC dependent:
Tags Parameter
0089 Authorisation Code
008A Authorisation Response Code
0091 Issuer Authentication Data
0071 Issuer Script Template 1 (needed for Step 11)
0072 Issuer Script Template 2 (needed for Step 11)
www.dspread.com
27
The data elements that are required are payment operator and issuer dependent. See the EVM
Book 3 Annex A for the full list of tags and the TLV structure.
In this step, the client APP should store the results, display the results, print receipts, and prompt
the user to remove the card from the QPOS device. Later, the batch data should be updated to the
server for settlement.
If a magnetic stripe card has been swiped, the encrypted PINBLOCK and the
encrypted track data will be returned along with the trackksn and the pinKsn in the
decodeData Hashtable.
www.dspread.com
28
www.dspread.com
29
2.6.1 getSdkVersion
Inputs None
See also
2.6.2 resetPos
Inputs None
Outputs BOOL
Description Reset and bring the QPOS back to a known initial state.
See also
2.6.3 startAudio
Signature -(void)startAudio;
Inputs None
Outputs None
www.dspread.com
30
2.6.4 stopAudio
Signature -(void)stopAudio;
Inputs None
Outputs None
See also
2.6.5 connectBT
Outputs BOOL
See also
2.6.6 disconnectBT
Inputs None
Outputs None
www.dspread.com
31
See also
2.6.7 isQposPresent
Signature -(BOOL)isQposPresent;
Inputs None.
See also
2.6.8 getQposId
Inputs timeout;
Outputs None
2.6.9 getQposInfo
Inputs None
Outputs None
www.dspread.com
32
2.6.10 setAmount
Outputs None
2.6.11 cancelSetAmount
www.dspread.com
33
Outputs None
2.6.12 doTrade
Inputs Timeout
Outputs None
Description Check the status of the Magnetic Card Reader, the EMV
Card reader, or NFC transceiver. It checks if a card has been
swiped, a NFC card has been tapped or an EMV card is
inserted. The result is returned by the onDoTradeResult
delegate method.
2.6.13 doCheckCard
Inputs Timeout
Outputs None
www.dspread.com
34
2.6.14 doEmvApp
Inputs EmvOption
Outputs None
2.6.15 setAmount
CashbackAmount
CurrencyCode
TransactionType
IsPosDisplayAmount
Outputs None
See also
www.dspread.com
35
2.6.16 selectEmvApp
Outputs None
See also
2.6.17 cancelSelectEmvApp
Inputs None
Outputs None
See also
2.6.18 finalConfirm
Inputs isConfirmed
Outputs None
See also
2.6.19 sendOnlineProcessResult
www.dspread.com
36
Outputs None
Description Send the tlv data that returned by the issuer to terminal.
2.6.20 isServerConnected
Inputs isConnected
Outputs None
2.6.21 sendTime
Inputs aterminalTime
Outputs None
www.dspread.com
37
2.6.22 setAmountIcon
-(void)setAmountIcon:(AmountType) amtType
amtIcon:(NSString *)aAmountIcon;
Inputs amtType
aAmountIcon
Outputs None
“RUP”
“USD”
“CNY"
See also
2.6.23 getPin
Inputs aTransactionData
Outputs None
www.dspread.com
38
2.6.24 powerOnIcc
Signature -(void)powerOnIcc;
Inputs None
Outputs None
2.6.25 powerOffIcc
Signature -(void)powerOffIcc;
Inputs None
Outputs None
2.6.26 sendApdu
Inputs apduStr
Outputs None
2.6.27 setPosSleepTime
Signature -(void)setPosSleepTime:(NSInteger)sleepTime;
www.dspread.com
39
Outputs None
2.6.28 updateEmvConfig(Deprecated)
Inputs emvAppCfg
emvCapkCfg
Outputs None
2.6.29 readEmvAppConfig
Signature -(void)readEmvAppConfig;
Inputs None
Outputs None
2.6.30 readEmvCapkConfig
Signature -(void)readEmvCapkConfig;
Inputs None
www.dspread.com
40
2.6.31 udpateWorkKey
Inputs pik
pikCheck
trk
trkCheck
mak
makCheck
tnsk
tnskCheck
keyIndex
timeout
Outputs None
www.dspread.com
41
2.6.32 MacKeyEncrypt
Inputs macStr
Outputs None
2.6.33 isQposPresent
Signature -(BOOL)isQposPresent;
Inputs None
Outputs BOOL
See also
2.6.34 setMasterKey
Inputs key
ckValue
keyIndex
timeout
Outputs None
www.dspread.com
42
2.6.35 calcMacSingle
Inputs macStr
Outputs None
2.6.36 calcMacDouble
Inputs macStr
keyIndex
timeout
Outputs None
2.6.37 calcMacSingleNoCheck
Inputs macStr
timeout
Outputs None
www.dspread.com
43
2.6.38 calcMacDoubleNoCheck
Inputs macStr
keyIndex
timeout
Outputs None
2.6.39 downloadRsaPublicKey
Signature -(void)downloadRsaPublicKey:(NSInteger)useType
RID:(NSString*)rid keyIndex:(NSString *)index
keyModule:(NSString *)module keyExponent:(NSString
*)exponent delay:(NSInteger)timeout;
Inputs useType
timeout
Outputs None
www.dspread.com
44
2.6.40 updateMasterKeyRandom
Signature -(void)updateMasterKeyRandom:(NSInteger)step
keyIndex:(NSString *)index masterKey:(NSString *)mKey
masterKeyCheck:(NSString *)mKeyCheck
delay:(NSInteger)timeout;
keyIndex
masterKey
masterKeyCheck
timeout
Outputs None
2.6.41 updateMasterKey
Inputs step
RN1
RN2
masterKey
www.dspread.com
45
timeout
Outputs None
Description
2.6.42 pinKey_TDES
Inputs keyIndex
pin
timeout
Outputs None
2.6.43 pinKey_TDESNoCheck
Inputs keyIndex
pin
timeout
Outputs None
www.dspread.com
46
2.6.44 setSystemDateTime
Inputs dataTime
timeout
Outputs None
See also
2.6.45 setMerchantID
Inputs merchantID
timeout
Outputs None
See also
2.6.46 setTerminalID
Inputs terminalID
timeout
www.dspread.com
47
See also
2.6.47 getMagneticTrackPlaintext
Signature - (void)getMagneticTrackPlaintext:(NSInteger)timeout;
Inputs timeout
Outputs None
2.6.48 getCardNo
Inputs None
Outputs None
2.6.49 getIccCardNo
Inputs aterminalTime
Outputs None
www.dspread.com
48
2.6.50 powerOffNFC
Inputs timeout
Outputs None
2.6.51 sendApduByNFC
Inputs apduString
timeout
Outputs None
2.6.52 powerOnNFC
Inputs isEncrypt
timeout
Outputs None
www.dspread.com
49
2.6.53 cbc_mac
Signature - (void)cbc_mac:(NSInteger)keyLen
atype:(NSInteger)algorithmType
otype:(NSInteger)operatorType data:(NSString *)dataStr
delay:(NSInteger)timeout withResultBlock:(void
(^)(NSString *))cbcmacBlock;
Inputs keyLen
algorithmType
operatorType
data
timeout
Outputs None
2.6.54 cbc_macNoCheck
Signature - (void)cbc_macNoCheck:(NSInteger)keyLen
atype:(NSInteger)algorithmType
otype:(NSInteger)operatorType data:(NSString *)dataStr
delay:(NSInteger)timeout withResultBlock:(void
(^)(NSString *))cbcmacBlock;
Inputs keyLen
algorithmType
operatorType
data
www.dspread.com
50
Outputs None
2.6.55 inquireECQAmount
Inputs transactionTime
Outputs None
2.6.56 isIdle
Signature -(BOOL)isIdle;
Inputs transactionTime
Outputs None
See also
2.6.57 anlysEmvIccData
Inputs tlv
Outputs None
www.dspread.com
51
2.6.58 VIPOSBatchSendAPDU
Signature -(void)VIPOSBatchSendAPDU:(NSDictionary *)
batchAPDU;
Inputs batchAPDU
Outputs None
2.6.59 synVIPOSBatchSendAPDU
Signature -(NSDictionary
*)synVIPOSBatchSendAPDU:(NSDictionary *)
batchAPDU;
Inputs isOpen
batchAPDU
Outputs None
2.6.60 anlysEmvIccData_qf
Inputs tlv
Outputs None
www.dspread.com
52
2.6.61 iccCashBack
random
Outputs None
2.6.62 setPosPresent
Inputs flag
Outputs None
See also
2.6.63 setCardTradeMode
Inputs cardTradeMode:
enum{ONLY_INSERT_CARD//only IC
www.dspread.com
53
See also
2.6.64 setPinPadFlag
Signature -(void)setPinPadFlag:(BOOL)flag;
Inputs flag
Outputs None
See also
2.6.65 qposStatus
Signature -(BOOL)qposStatus;
Inputs None
Outputs None
See also
2.6.66 readBusinessCard
www.dspread.com
54
readLen
cardPin
vender_id
timeout
Outputs None
2.6.67 writeBusinessCard
address
data
cardPin
isUpdatePinFlag
vender_id
timeout
Outputs None
www.dspread.com
55
2.6.68 syncReadBusinessCard
address
readLen
cardPin
vender_id
timeout
Outputs None
See also
2.6.69 syncWriteBusinessCard
address
data
cardPin
isUpdatePinFlag
vender_id
timeout
www.dspread.com
56
See also
2.6.70 confirmAmount
timeout
Outputs None
2.6.71 setAmount
cashbackAmount:enchashment amount
currencyCode:currency code
transactionType:transaction type
Outputs None
www.dspread.com
57
2.6.72 getPin
Signature - (void)getPin:(NSInteger)encryptType
keyIndex:(NSInteger)keyIndex
maxLen:(NSInteger)maxLen typeFace:(NSString
*)typeFace cardNo:(NSString *)cardNo data:(NSString
*)data delay:(NSInteger)timeout withResultBlock:(void
(^)(BOOL isSuccess, NSDictionary * result))getPinBlock;
Inputs encryptType:default:0
keyIndex:default:0
cardNo
data:attached data
timeout
Outputs None
2.6.73 doUpdateIPEKOperation
www.dspread.com
58
Inputs groupKey、tracksn、trackipek、trackipekCheckValue、
emvksn、emvipek、emvipekcheckvalue、pinksn、
pinipek、pinipekcheckValue
2.6.74 updateIPEKOperationByKeyType
Signature - (void)updateIPEKOperationByKeyType:(NSString
*)groupKey
tracksn:(NSString *)trackksn
trackipek:(NSString *)trackipek
trackipekCheckValue:(NSString
*)trackipekCheckValue
emvksn:(NSString *)emvksn
emvipek:(NSString *)emvipek
emvipekcheckvalue:(NSString
*)emvipekcheckvalue
www.dspread.com
59
Inputs groupKey、tracksn、trackipek、trackipekCheckValue、
emvksn、emvipek、emvipekcheckvalue、pinksn、
pinipek、pinipekcheckValue
2.6.75 doSetBuzzerOperation
Signature -(void)doSetBuzzerOperation:(NSInteger)timeOut
block:(void (^)(BOOL isSuccess,
NSString*stateStr))buzzerBlock;
Inputs timeOut
2.6.76 updateEMVRID
Signature -(void)updateEMVRID:(NSInteger)operationType
data:(NSString *)data
block:(void(^)(BOOL isSuccess,NSString
*stateStr))EMVBlock;
Inputs operationType
data
www.dspread.com
60
2.6.77 updateAID
Signature -(void)updateAID:(NSInteger)operationType
data:(NSString *)data
block:(void(^)(BOOL isSuccess,NSString
*stateStr))EMVBlock;
Inputs operationType
data
2.6.78 setAIDwithBool
Signature -(void)setAIDwithBool:(BOOL)isTrue
data:(NSString *)data
block:(void(^)(BOOL isSuccess,NSString
*stateStr))EMVBlock
Inputs isTrue
data
2.6.79 setOnlineTime
Signature -(void)setOnlineTime:(NSInteger)aTime
Inputs aTime
Outputs None
www.dspread.com
61
2.6.80 getUpdateCheckValueBlock
Signature -(void)getUpdateCheckValueBlock:(void(^)(BOOL
isSuccess,NSString *stateStr))updateCheckValueBlock
Inputs None
2.6.81 doSetShutDownTime
Inputs timeOut
Outputs None
2.6.82 getBluetoothState
Signature -(BOOL)getBluetoothState
Inputs None
www.dspread.com
62
2.6.83 setBTAutoDetecting
Inputs flag
Outputs None
2.6.84 getConnectedPeripheral
Signature -(CBPeripheral*)getConnectedPeripheral:(NSString
*)bluetoothName;
Inputs Bluetooth Name
Outputs Peripheral
2.6.85 connectBluetoothByCBPeripheral
Signature -(BOOL)connectBluetoothByCBPeripheral:
( CBPeripheral*)myCBPeripheral;
Inputs CBPeripheral
2.6.86 connectBluetoothNoScan
Signature -(BOOL)connectBluetoothNoScan:
(NSString*)bluetoothName;
Inputs bluetoothName
www.dspread.com
63
2.6.87 getConnectedDevices
Inputs None
2.6.88 cancelTrade
Signature -(BOOL)cancelTrade:(BOOL)isUserCancel;
Inputs isUserCancel
2.6.89 asynresetPosStatus
Signature -(void)asynresetPosStatus;
Inputs None
Outputs None
www.dspread.com
64
2.6.90 setDoTradeMode
Signature -(void)setDoTradeMode:(DoTradeMode)doTradeMode;
Inputs doTradeMode
Outputs None
2.6.91 setFormatID
Inputs formatID
Outputs None
2.6.92 setAmountPoint
Signature -(void)setAmountPoint:(BOOL)amoutPoint;
Inputs amoutPoint
Outputs None
2.6.93 doTrade_QF
Signature -(void)doTrade_QF:(NSInteger)tradeMode
TradeRandomString:(NSString *)randomString
TradeExtraString:(NSString *)extraString
timeout:(NSInteger) delay;
www.dspread.com
65
Outputs None
2.6.94 setIsQuickEMV
Signature -(void)setIsQuickEMV:(BOOL)isQuickEMV;
Inputs isQuickEMV
Outputs None
2.6.95 getQuickEMV
Signature -(BOOL)getQuickEMV;
Inputs None
Outputs QuickEMV
2.6.96 getNFCBatchData
Inputs None
www.dspread.com
66
2.6.97 powerOffNFC
2.6.98 sendPinEntryResult
Inputs pin
Outputs None
2.6.99 cancelPinEntry
Signature -(void)cancelPinEntry;
Inputs None
Outputs None
2.6.100 bypassPinEntry
Signature -(void)bypassPinEntry;
Inputs None
www.dspread.com
67
2.6.101 updateEMVConfigByXml
Inputs xmlStr
Outputs None
Description Update Emv configuration through xml file and add mac
verification.
2.6.102 updateEmvAPPByTlv
Signature -
(void)updateEmvAPPByTlv:(EMVOperation)emvOperation
appTlv:(NSString *)appTlv;
Inputs emvOperation :
www.dspread.com
68
Outputs None
onReturnGetEMVListResult
2.6.103 updateEmvCAPKByTlv
Signature -
(void)updateEmvCAPKByTlv:(EMVOperation)emvOperati
on capkTlv:(NSString *)capkTlv;
Inputs capkTlv
Outputs None
www.dspread.com
69
onReturnGetEMVListResult
2.6.104 updateEmvAPP(Deprecated)
onReturnGetEMVListResult
2.6.105 updateEmvCAPK(Deprecated)
Inputs operationType、data
onReturnGetEMVListResult
www.dspread.com
70
2.6.106 lcdShowCustomDisplay
Signature -(void)lcdShowCustomDisplay:(LcdModeAlign)
alcdModeAlign lcdFont:(NSString *)alcdFont
delay:(NSInteger)timeout;
Inputs alcdModeAlign、alcdFont、timeout
Outputs None
2.6.107 lcdShowCloseDisplay
Signature -(void)lcdShowCloseDisplay;
Inputs None
Outputs None
2.6.108 getUpdateProgress
Signature -(NSInteger)getUpdateProgress;
Inputs None
Outputs None
2.6.109 updatePosFirmware
Signature -(NSInteger)updatePosFirmware:(NSData*)aData
address:(NSString*)devAddress;
www.dspread.com
71
Outputs None
2.6.110 syncGetPin
Signature -(NSDictionary*)syncGetPin:(NSInteger)encryptType
keyIndex:(NSInteger)keyIndex
maxLen:(NSInteger)maxLen typeFace:(NSString
*)typeFace cardNo:(NSString *)cardNo date:(NSString
*)data delay:(NSInteger)timeout;
Inputs encryptType、keyIndex、maxLen、typeFace、cardNo、
Data、timeout
2.6.111 getICCTag
www.dspread.com
72
2.6.112 customInputDisplay
Signature -(void)customInputDisplay:(NSInteger)operationType
displayType:(NSInteger)dispType
maxLen:(NSInteger)maxLen DisplayString:(NSString
*)displayStr delay:(NSInteger)timeout
withResultBlock:(void (^)(BOOL isSuccess, NSString *
result))customInputDisplayResult;
2.6.113 isCardExist
Signature -(void)isCardExist:(NSInteger)timeout
withResultBlock:(void (^)(BOOL))isCardExistBlock;
Inputs timeout
2.6.114 isCardExistInOnlineProcess
Signature -(void)isCardExistInOnlineProcess:(NSInteger)timeout
withResultBlock:(void (^)(BOOL))isCardExistBlock;
Inputs timeout
www.dspread.com
73
2.6.115 cbc_mac_cn_all
Signature -(void)cbc_mac_cn_all:(NSInteger)keyLen
atype:(NSInteger)algorithmType
otype:(NSInteger)operatorType data:(NSString *)dataStr
delay:(NSInteger)timeout withResultBlock:(void
(^)(NSString *))cbcmacBlock;
Inputs keyLen、algorithmType、operatorType、dataStr、timeout
2.6.116 getKsn
Outputs Ksn
2.6.117 getKeyCheckValue
Signature -
(void)getKeyCheckValue:(CHECKVALUE_KEYTYPE)ch
eckValueType keyIndex:(NSInteger)keyIndex;
Inputs checkValueType、keyIndex
Outputs None
www.dspread.com
74
2.6.118 setBuzzerStatus
Signature -(void)setBuzzerStatus:(NSInteger)status;
Inputs status
Outputs None
2.6.119 setAESKey
Outputs None
2.6.120 getAESTransmissionKey
Signature -(void)getAESTransmissionKey:(NSInteger)timeout;
Inputs timeout
Outputs None
www.dspread.com
75
2.6.121 getShutDownTime
Signature -(void)getShutDownTime;
Inputs None
Outputs None
2.6.122 setPanStatus
Inputs PanStatus_DEFAULT
PanStatus_PLAINTEXT
PanStatus_ENCRYPTED
Outputs None
2.6.123 getDevicePublicKey
Signature -(void)getDevicePublicKey:(NSInteger)timeout;
Inputs timeout
Outputs None
www.dspread.com
76
2.6.124 setShutDownTimeOnConnected
Signature -(void)setShutDownTimeOnConnected:(NSInteger)time;
Inputs time
Outputs None
2.6.125 getShutDownTimeOnConnected
Signature -(void)getShutDownTimeOnConnected;
Inputs None
Outputs None
2.6.126 getCvmPinTryLimit
Signature -(NSInteger)getCvmPinTryLimit;
Inputs None
www.dspread.com
77
2.6.127 updateKeyByTR_31
Signature -(void)updateKeyByTR_31:(NSInteger)keyIndex
keyBlock:(NSString *)keyBlock;
-(void)updateKeyByTR_31:(NSInteger)keyIndex
keyBlock:(NSString *)keyBlock
timeout:(NSInteger)timeout;
Inputs keyIndex、keyBlock
timeout
Outputs None
2.6.128 generateSessionKeys
Signature -(void)generateSessionKeys;
Inputs None
Outputs None
2.6.129 updateRSA
Inputs publicKey、pemFile
Outputs None
www.dspread.com
78
2.6.130 getEncryptData
Outputs None
2.6.131 getMPUCardInfo
Signature (void)getMPUCardInfo:(void(^)(NSDictionary
*dict))mpuInfoBlock;
Inputs None
2.6.132 getMIccCardData
Inputs transactionTime
Outputs None
www.dspread.com
79
2.6.133 updateKeyByTR_31VersionD
Signature -(void)updateKeyByTR_31VersionD:(NSInteger)keyIndex
ksn:(NSString *)ksn keyBlock:(NSString *)keyBlock;
Inputs keyIndex、ksn、keyBlock
2.6.134 powerOnFelica
Signature -(void)powerOnFelica:(NSInteger)timeout;
Inputs timeout
Outputs None
2.6.135 powerOffFelica
Signature -(void)powerOffFelica:(NSInteger)timeout;
Inputs timeout
Outputs None
www.dspread.com
80
2.6.136 sendApduByFelica
Outputs None
2.6.137 generateTransportKey
Signature -(void)generateTransportKey:(NSInteger)timeout
dataBlock:(void(^)(NSDictionary *))dataBlock;
Inputs timeout
2.6.138 sendCVV
2.6.139 getEncryptedDataBlock
Signature -(void)getEncryptedDataBlock:(NSInteger)keyIndex
dataBlock:(void(^)(NSDictionary *))dataBlock;
www.dspread.com
81
2.6.140 setIsSaveLog
Signature -(void)setIsSaveLog:(BOOL)IsSaveLog
block:(void(^)(BOOL isSuccess,NSString
*stateStr))IsSaveLogBlock;
Inputs IsSaveLog
Outputs result
2.6.141 doTradeLogOperation
Signature -(void)doTradeLogOperation:(NSInteger)operationType
data:(NSInteger)data
block:(void(^)(BOOL isSuccess,NSInteger markType,
NSDictionary *stateStr))doTradeLogBlock;
Inputs operationType
data
2.6.142 operateLEDByType
Signature - (void)operateLEDByType:(LEDType)ledType
colorValue:(NSString *)colorValue
ledDirection:(LEDDirection)ledDirection
ledStatus:(LEDStatus)ledStatus
www.dspread.com
82
ledDirection: up、down、left、right、all
ledStatus: on、off、blink
Outputs resultBlock
2.6.143 playBuzzerByType
Signature - (void)playBuzzerByType:(BuzzerType)buzzerType
buzzerOnTime:(NSInteger)buzzerOnTime
buzzerOffTime:(NSInteger)buzzerOffTime
buzzerTimes:(NSInteger)buzzerTimes
resultBlock:(void(^)(BOOL isSuccess))resultBlock;
Inputs buzzerType: buzzer control、payment success、payment
error、pairing success
Outputs resultBlock
www.dspread.com
83
2.6.144 pollOnMifareCard
Signature -(void)pollOnMifareCard:(NSInteger)timeout
dataBlock:(void(^)(NSDictionary *))dataBlock;
Inputs timeout
Outputs dataBlock
2.6.145 authenticateMifareCard
Signature -
(void)authenticateMifareCard:(MifareCardType)mifareCard
Type keyType:(MifareKeyType)keyType block:(NSString
*)block keyValue:(NSString *)keyValue
timeout:(NSInteger)timeout resultBlock:(void(^)(BOOL
isSuccess))resultBlock;
Inputs mifareCardType:CLASSIC、ULTRALIGHT
keyType:KEY_A 、 KEY_B
timeout
Outputs resultBlock
2.6.146 operateMifareCardData
Signature -
(void)operateMifareCardData:(MifareCardOperationType)o
perationType block:(NSString *)block data:(NSString
*)data timeout:(NSInteger)timeout
dataBlock:(void(^)(NSDictionary *))dataBlock;
Inputs operationType: ADD、REDUCE、RESTORE
www.dspread.com
84
data
timeout
Outputs dataBlock
2.6.147 readMifareCard
Signature -(void)readMifareCard:(MifareCardType)mifareCardType
block:(NSString *)block timeout:(NSInteger)timeout
dataBlock:(void(^)(NSDictionary *))dataBlock;
Inputs mifareCardType:CLASSIC、ULTRALIGHT
block:block address
timeout
Outputs dataBlock
2.6.148 writeMifareCard
Signature -(void)writeMifareCard:(MifareCardType)mifareCardType
block:(NSString *)block data:(NSString *)data
timeout:(NSInteger)timeout resultBlock:(void(^)(BOOL
isSuccess))resultBlock;
Inputs mifareCardType:CLASSIC、ULTRALIGHT
block:block address
data
timeout
Outputs resultBlock
www.dspread.com
85
2.6.149 finishCard
Signature -(void)finishCard:(NSInteger)timeout
resultBlock:(void(^)(BOOL isSuccess))resultBlock;
Inputs timeout
Outputs resultBlock
2.6.150 setIsOperateMifare
Signature -(void)setIsOperateMifare:(BOOL)isOperateMifare;
Outputs None
2.6.151 setIsSupportClsSelectEmvApp
Signature -
(void)setIsSupportClsSelectEmvApp:(BOOL)isSupportClsS
electEmvApp;
Inputs BOOL(True or False)
Outputs None
www.dspread.com
86
2.6.152 getEncryptDataDict
Inputs None
Outputs RandomData、AESKey、PAN、IsOnlinePin、
PinTryLimit
2.6.153 sendCvmPin
Outputs None
2.6.154 getCvmKeyList
Inputs None
Description Get the random key list from terminal which sdk can use
this list to look up the corresponding index for PIN and send
it to terminal.
www.dspread.com
87
2.7.1 onRequestWaitingUser
Inputs None
Outputs None
See also
2.7.2 onQposIdResult
Inputs None
Outputs posId;
2.7.3 onQposInfoResult
Inputs None
www.dspread.com
88
2.7.4 onDoTradeResult
Inputs None
Outputs result
decodeData
doEmvApp: (EmvOption)aemvOption
2.7.5 onRequestSetAmount
Inputs None
Outputs None
2.7.6 onRequestSelectEmvApp
Inputs None
Outputs appList
www.dspread.com
89
-(void) cancelSelectEmvApp;
2.7.7 onRequestIsServerConnected
Inputs None
Outputs None
2.7.8 onRequestFinalConfirm
Inputs None
Outputs None
2.7.9 onRequestOnlineProcess
Inputs None
www.dspread.com
90
anlysEmvIccData
sendOnlineProcessResult
2.7.10 onRequestTime
Inputs None
Outputs None
sendTime
2.7.11 onRequestTransactionResult
Inputs None
Outputs None
2.7.12 onRequestTransactionLog
Inputs None
www.dspread.com
91
Description reserve
See also
2.7.13 onRequestBatchData
Inputs None
2.7.14 onRequestQposConnected
Inputs None
Outputs None
2.7.15 onRequestQposDisconnected
Inputs None
Outputs None
www.dspread.com
92
2.7.16 onRequestNoQposDetected
Inputs None
Outputs None
2.7.17 onError(Deprecated)
Inputs None
See also
2.7.18 onRequestDisplay
Inputs None
See also
www.dspread.com
93
2.7.19 onRequestUpdateWorkKeyResult
Inputs None
2.7.20 onGetCardNoResult
Inputs None
2.7.21 onReturnReversalData
Inputs None
2.7.22 onReturnGetPinResult
www.dspread.com
94
2.7.23 onReturnPowerOnIccResult
Inputs None
ksn is all FF, then ATR and APDU data are not encrypted.
2.7.24 onReturnPowerOffIccResult
Inputs None
www.dspread.com
95
2.7.25 onReturnApduResult
Inputs None
the apdu data are encrypted, the KSN returned after the
sendApdu
2.7.26 onReturnSetSleepTimeResult
Signature -(void)onReturnSetSleepTimeResult:(BOOL)isSuccess
Inputs None
www.dspread.com
96
2.7.27 onRequestCalculateMac
Inputs None
doDoubleMac
doSingleMac
2.7.28 onReturnCustomConfigResult
Signature -(void)onReturnCustomConfigResult:(BOOL)isSuccess
config:(NSString*)resutl
Inputs None
2.7.29 onReturnSetMasterKeyResult
Inputs None
www.dspread.com
97
2.7.30 onReturnBatchSendAPDUResult
Inputs None
Outputs apduResponses
2.7.31 onReturniccCashBack
Inputs None
Outputs result
getIccCardNo
inquireECQAmount
2.7.32 onUpdatePosFirmwareResult
-(void)
Signature
onUpdatePosFirmwareResult:(UpdateInformationResult)result
Inputs None
www.dspread.com
98
2.7.33 onReturnDownloadRsaPublicKey
Inputs None
Outputs result
2.7.34 onPinKey_TDES_Result
Inputs None
2.7.35 onUpdateMasterKeyResult
Inputs None
updateMasterKey
www.dspread.com
99
2.7.36 onEmvICCExceptionData
Inputs None
See also
2.7.37 onReturnUpdateEMVRIDResult
Signature -(void)onReturnUpdateEMVRIDResult:(BOOL)isSuccess
Inputs None
2.7.38 onLcdShowCustomDisplay
Inputs None
www.dspread.com
100
2.7.39 onGetKeyCheckValue
Signature -(void)onGetKeyCheckValue:(NSDictionary
*)checkValueResult
Inputs None
Outputs checkValueResult
2.7.40 onGetShutDownTime
Inputs None
Outputs time
2.7.41 onGetDevicePublicKey
Inputs None
Outputs clearKeys
2.7.42 onReturnUpdateKeyByTR_31Result
Signature -(void)onReturnUpdateKeyByTR_31Result:(BOOL)result
Inputs None
www.dspread.com
101
2.7.43 onQposGenerateSessionKeysResult
Signature -(void)onQposGenerateSessionKeysResult:(NSDictionary
*)result
Inputs None
Outputs result
2.7.44 onReturnGetEncryptDataResult
Signature -(void)onReturnGetEncryptDataResult:(NSDictionary*)tlv
Inputs None
2.7.45 onReturnPowerOnFelicaResult
Signature -
(void)onReturnPowerOnFelicaResult:(FelicaStatusCode)resul
t
Inputs None
Outputs result
www.dspread.com
102
2.7.46 onReturnPowerOffFelicaResult
Signature -
(void)onReturnPowerOffFelicaResult:(FelicaStatusCod
e)result
Inputs None
Outputs result
2.7.47 onReturnSendApduFelicaResult
Signature -
(void)onReturnSendApduFelicaResult:(FelicaStatu
sCode)result responseLen:(NSString *)responseLen
responseData:(NSString *)responseData
Inputs None
Outputs Result、responseLen、responseData
2.7.48 onAsyncResetPosStatus
Inputs None
Outputs Reset
www.dspread.com
103
2.7.49 onReturnUpdateEMVResult
Signature -(void)onReturnUpdateEMVResult:(BOOL)isSuccess
Inputs None
2.7.50 onReturnGetEMVListResult
Inputs None
Outputs result
2.7.51 onReturnBuzzerStatusResult
Signature -(void)onReturnBuzzerStatusResult:(BOOL)isSuccess
Inputs None
2.7.52 onReturnSetAESResult
Signature -(void)onReturnSetAESResult:(BOOL)isSuccess
resultStr:(NSString *)result
www.dspread.com
104
2.7.53 onReturnAESTransmissonKeyResult
Signature -
(void)onReturnAESTransmissonKeyResult:(BOOL)isSucce
ss resultStr:(NSString *)result
Inputs None
2.7.54 onReturnSetConnectedShutDownTimeResult
Signature -
(void)onReturnSetConnectedShutDownTimeResult:(BOOL)i
sSuccess
Inputs None
2.7.55 onReturnGetConnectedShutDownTimeResult
Signature -
(void)onReturnGetConnectedShutDownTimeResult:(NSStri
ng *)time
Inputs None
www.dspread.com
105
2.7.56 onDoSetRsaPublicKey
Signature -(void)onDoSetRsaPublicKey:(BOOL)result
Inputs None
www.dspread.com