UniPay SDK Guide for Android  0.02.011
API reference
 All Data Structures Functions Variables Pages
UniPay Main Transaction Commands

The methods below are provided as a reference to the main commands needed to execute an EMV transaction or perform a swipe.

EMV Methods

Start EMV Transaction
com.idtechproducts.emv.UniPayEMV.startEMVTransaction()

Begins an amount authorization request with the ICC. Returns authorization decision (approved, denied, or go online) in delegate method.


Complete Online EMV Transaction
com.idtechproducts.emv.UniPayEMV.completeOnlineEMVTransaction()

After receiving a host response, pass the result code as a string ("00"). The tags will be returned in the emvTransactionData delegate protocol.

If there was a communication error with host, you must still finish the EMV transaction by passing "EMV_COMPLETION_RESULT_UNABLE_TO_GO_ONLINE".

typedef enum{
EMV_COMPLETION_RESULT_ACCEPTED = 0X00,
EMV_COMPLETION_RESULT_UNABLE_TO_GO_ONLINE = 0X01,
EMV_COMPLETION_RESULT_TECHNICAL_ISSUE = 0X02,
EMV_COMPLETION_RESULT_DECLINED = 0X03,
EMV_COMPLETION_RESULT_ISSUER_REFERAL = 0X04
} EMV_COMPLETION_RESULT;

Terminal Configuration
com.idtechproducts.emv.UniPayEMV.retrieveTerminalData()
com.idtechproducts.emv.UniPayEMV.setTerminalData()

Methods for terminal configuration. When setting the terminal data, you populate and pass and UniPay_TerminalData structure.


AID Management
com.idtechproducts.emv.UniPayEMV.retrieveApplicationData()
com.idtechproducts.emv.UniPayEMV.retrieveAIDList()
com.idtechproducts.emv.UniPayEMV.setApplicationData()
com.idtechproducts.emv.UniPayEMV.removeApplicationData()

Methods for AID management. When setting the AID, you populate and pass UniPay_ApplicationID. When retrieving the AID list, the list of AID Names/length can be retrieved from the populated NSArray


Kernel Version
com.idtechproducts.emv.UniPayEMV.getEMVKernelVersion()

Method to retrieve kernel version.


APDU Communication
com.idtechproducts.device.IDT_Device.icc_exchangeAPDU()

Allows the direct sending of APDU packets to ICC

MSR

Request Swipe
com.idtechproducts.device.IDT_Device.msr_startMSRSwipe()

Enables MSR to receive Swipe. Results are returned as IDTMSRData in com.idtechproducts.device.OnReceiverListener.swipeMSRData

Cancel Swipe
com.idtechproducts.device.IDT_Device.msr_cancelMSRSwipe()

Disables the MSR from receiving swipes.