All pages
Powered by GitBook
1 of 31

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

.NET (Windows)

Universal SDK Documentation (.NET/Windows)

The .NET edition of the MagTek Universal SDK (MTUSDK), giving developers a single managed interface for connecting to and controlling MagTek card readers and PIN pad devices — including the DynaFlex family — from Windows .NET applications. The complete API reference is available as a PDF download below.

In This Section

Reference Section

Information Available

MagTek Universal SDK for Windows .NET applications — downloadable PDF reference.

Need More Help

Need Help?

For additional support, please contact MagTek Support:

Technical Support:

  • 📧 Email:

Universal SDK Documentation

The Universal SDK is MagTek's cross-platform SDK for building against MMS (DynaFamily) readers. It wraps the MMS command set in native calls for each platform — handling connection, sending commands, and receiving responses and notifications — so you work in your language instead of composing raw messages. Choose your platform below; the command each call maps to is documented in the API & Command Reference.

In This Section

Reference Section

Information Available

Build against MMS readers from .NET — libraries and APIs for connecting to a device, sending commands, and handling responses and notifications on Windows and other .NET hosts.

ISystemStatusCallback Delegates

This interface invokes callback functions to receive data and/or a detailed response. To register for the event(s), call the setSystemStatusCallback() function with the name of a class that implements the ISystemStatusCallback interface.

This event is called when an error occurs with the connection with the MQTT broker.

Prototype

Parameters

Parameter
Description

Linux

The Linux edition of the MagTek Universal SDK (MTUSDK), giving developers a single interface for connecting to and controlling MagTek card readers and PIN pad devices — including the DynaFlex family — from Linux host applications. The complete API reference is available as a PDF download below.

IDeviceCapabilities

Create an instance of the IDeviceCapabilities using IDevice.getCapabilities(). Then use the functions described in this chapter.

This property returns true if the device is equipped with a battery that preserves the internal clock when not powered by a host system or charging.

Copy

Return Value:

Returns true if device is equipped with a battery backed clock. Otherwise, returns false.

This property returns true if the device is equipped with display.

Copy

Return Value:

DeviceInfo

Create an instance of the DeviceInfo from IDevice.getDeviceInfo(). Then use the function calls described in this chapter.

This function returns the model name of the device.

Return Value:

Returns the model name of the device.

This function returns the name of the device.

Return Value:

Returns the name of the device.

For the complete documentation index, see . This page is also available as .

📞 Phone: 1-562-546-6800 (US)
  • 🕐 Hours: Monday-Friday, 5:30 AM - 5:00 PM PST

  • Online Resources:

    • 🌐 Support Portal: developer.magtek.com

    Documentation Feedback:

    Help us improve this documentation! feedback@magtek.com

    Download Link
    support@magtek.com

    error

    Type of error enumeration.

    details

    Details of the error.

    Return Value: None

    void OnError(
        ErrorType error, 
        String details);

    OnError

    String DeviceInfo.getModel();

    getModel

    getName

    llms.txt
    Markdown
    Returns true if device is equipped with a display. Otherwise, returns false.

    This property returns true if the device has the option to disable or enable the magnetic stripe reader head (MSR). The MSR may be powered down while the device is idle to minimize power consumption.

    Copy

    Return Value:

    Returns true if device supports MSR power saver. Otherwise, returns false.

    This property returns an enumerate list of payment methods supported by the device.

    Copy

    Return Value:

    Returns a list of PaymentMethod.

    This property returns true if the device is equipped with a PIN Pad.

    Copy

    Return Value:

    Returns true if device is equipped with a PIN Pad. Otherwise, returns false.

    This property returns true if the device is equipped with signature capture.

    Copy

    Return Value:

    Returns true if device is equipped with signature capture. Otherwise, returns false.

    This property returns true if the device supports Secure Reading and Exchange of Data.

    Copy

    Return Value:

    Returns true if device supports SRED. Otherwise, returns false.

    BatteryBackedClock

    Display

    MSRPowerSaver

    PaymentMethods

    PINPad

    Signature

    SRED

    String DeviceInfo.getName();
    boolean IDeviceCapabilities.BatteryBackedClock();
    boolean IDeviceCapabilities.Display();
    boolean IDeviceCapabilities.MSRPowerSaver();
    List<PaymentMethod> IDeviceCapabilities.PaymentMethods();
    boolean IDeviceCapabilities.PINPad();
    boolean IDeviceCapabilities.Signature();
    boolean IDeviceCapabilities.SRED();

    Java

    Build against MMS readers from Java — libraries for connecting to a device and exchanging the MMS command set on any host with a Java Virtual Machine.

    iOS

    Build against MMS readers from iOS — libraries for connecting over USB or Bluetooth LE and exchanging the MMS command set in your iOS app.

    Linux

    Build against MMS readers from Linux — libraries for connecting to a device and exchanging the MMS command set on Linux hosts.

    Android

    Instructions for software developers who want to create Android software solutions that include MagTek devices connected to an Android based host.

    Reference Section

    Information Available

    Universal SDKs

    Download Software Developer Kits including libraries and APIs for connecting to a device, sending commands, and handling responses and notifications.

    Download the SDKs

    Need More Help

    Need Help?

    For additional support, please contact MagTek Support:

    Technical Support:

    • 📧 Email: support@magtek.com

    • 📞 Phone: 1-562-546-6800 (US)

    • 🕐 Hours: Monday-Friday, 5:30 AM - 5:00 PM PST

    Online Resources:

    • 🌐 Support Portal: developer.magtek.com

    Documentation Feedback:

    Help us improve this documentation!

    .NET (Windows)

    Reference Section

    Information Available

    Download Link

    MagTek Universal SDK for Linux applications — downloadable PDF reference.

    Universal SDK Documentation (Linux)

    In This Section

    Need More Help

    Need Help?

    For additional support, please contact MagTek Support:

    Technical Support:

    • 📧 Email: support@magtek.com

    • 📞 Phone: 1-562-546-6800 (US)

    • 🕐 Hours: Monday-Friday, 5:30 AM - 5:00 PM PST

    Online Resources:

    • 🌐 Support Portal: developer.magtek.com

    Documentation Feedback:

    Help us improve this documentation!

    Java

    Universal SDK Documentation (Java)

    The Java edition of the MagTek Universal SDK (MTUSDK), giving developers a single interface for connecting to and controlling MagTek card readers and PIN pad devices — including the DynaFlex family — from Java host applications. The complete API reference is available as a PDF download below.

    In This Section

    Reference Section

    Information Available

    MagTek Universal SDK for Java applications — downloadable PDF reference.

    Need More Help

    Need Help?

    For additional support, please contact MagTek Support:

    Technical Support:

    • 📧 Email:

    iOS

    Universal SDK Documentation (iOS)

    The iOS edition of the MagTek Universal SDK (MTUSDK), giving developers a single interface for connecting to and controlling MagTek card readers and PIN pad devices — including the DynaFlex family — from native iOS apps. The complete API reference is available as a PDF download below.

    In This Section

    Reference Section

    Information Available

    MagTek Universal SDK for iOS apps — downloadable PDF reference.

    Need More Help

    Need Help?

    For additional support, please contact MagTek Support:

    Technical Support:

    • 📧 Email:

    How to Set Up the SDK

    To set up the MagTek Universal SDK library for Android, download the 1000007352 MagTek Universal SDK for MMS Devices (Android) available from MagTek.com.

    To add the MT Universal libraries to a custom software project in Android Studio, follow these steps:

    • Launch Android Studio.

    • Copy the following AAR file to the libs subfolder of your software project: MTUSDK.aar

    • Ensure your project settings are set up correctly.

    • Clean, build, and run your custom software project to make sure the library imported correctly.

    • In your custom software, create an instance of MTUSDK. For examples, see the source code included with the MagTek Universal Demo project and/or the Code Examples section in this document.

    • Depending on the connection types supported, the project should include the uses-features and uses-permissions as specified in the table below in its AndroidManifest.xml file. For examples, see the AndroidManifest.xml included with the MagTek Universal Demo project.

    Connection Type
    AndroidManifest

    To Run/Debug the sample code, follow these steps:

    • In Android Studio, select File -> Open ...

    • Select MTUSDKDemo project, click OK.

    • Select Run -> Run app to run the sample code or select Run -> Debug app

    IEventSubscriber Delegates

    MTUSDKNET API will invoke the callback function in this chapter to provide the requested data and/or a detailed response. To delegate the event, call the subscribeAll function with the name of a class that implements the IEventSubscriber Delegates interface.

    OnEvent

    OnEvent handles all event types. The eventType parameter defines which event is triggered.

    public void OnEvent( 
        EventType eventType, 
        IData data);
    Parameter
    Description

    eventType

    Return Value: None

    Example

    In this example, the main window implements IEventSubscriber. The keyword this is used to pass in the name of the current class MainWindow.

    Classes can be initialized by passing in the data byte array.

    Example

    feedback@magtek.com
    feedback@magtek.com
    📞 Phone: 1-562-546-6800 (US)
  • 🕐 Hours: Monday-Friday, 5:30 AM - 5:00 PM PST

  • Online Resources:

    • 🌐 Support Portal: developer.magtek.com

    Documentation Feedback:

    Help us improve this documentation! feedback@magtek.com

    Download Link
    support@magtek.com
    📞 Phone: 1-562-546-6800 (US)
  • 🕐 Hours: Monday-Friday, 5:30 AM - 5:00 PM PST

  • Online Resources:

    • 🌐 Support Portal: developer.magtek.com

    Documentation Feedback:

    Help us improve this documentation! feedback@magtek.com

    Download Link
    support@magtek.com

    USB

    <uses-feature android:name="android.hardware.usb.host" />

    Serial

    WebSocket

    <uses-permission android:name="android.permission.INTERNET" />

    to run it in debug mode.

    Audio

    <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />

    BLE BLEEMV BLEEMVT

    <uses-feature android:name="android.hardware.bluetooth_le" /> <uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

    Bluetooth

    <uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />

    An enumeration indicating the event triggered by the device.

    data

    Contains the data for the event. The payload is dependent on the event type.

    Event Data Parsing

    public class OnEventClass implements IEventSubscriber
    {
        public void OnEvent(EventType eventType, IData data)
        {
            // Event handler
        }
    
    }
    
    OnEventClass eventCallBack = new OnEventClass(); 
    device.subscribeAll(evenCallBack);
    public partial class MainWindow implements IEventSubscriber
    {
        public void OnEvent(EventType eventType, IData data)
        {
            // Event handler
        }
        
        public void connectDevice()
        {
            device.subscribeAll(this);
        }
    }
    public void OnEvent(EventType eventType, IData data)
        {
            // Barcode data BarCodeData barcodeData =
    BarCodeDataBuilder.GetBarCodeData(DeviceType.MMS, data.ByteArray());
     
        // Input request
        InputRequest ir = new InputRequest(data.ByteArray());
     
        // NFC data
        NFCData nfcData = NFCDataBuilder.GetNFCData(DeviceType.MMS, data.ByteArray());
    
        // Enhanced input request 
        EnhancedInputRequest eir = new
    EnhancedInputRequest(data.ByteArray());
        List<DirectoryEntry> deList = eir.EnhancedSelectionList;
     
        }

    Classes

    Classes

    Reference for the individual classes in the MagTek Universal SDK — the data objects used to configure commands and read structured results back from the device. Entries are listed alphabetically across two pages, Classes A–I and Classes N–Z.

    In This Section

    Reference Section

    Information Available

    Alphabetical reference for the SDK's data and result classes (Classes A–I).

    Appendix A - Status Codes

    public enum StatusCode
    {
        SUCCESS = 0,
        TIMEOUT = 1,
        ERROR = 2,
        UNAVAILABLE = 3
    }
    Enum
    Description

    SUCCESS

    The operation completed successfully.

    TIMEOUT

    The operation timed out.

    IMQTTDeviceStatusCallback Delegates

    This interface invokes callback functions to receive data and/or a detailed response. To register for the event(s), call the setMQTTDeviceStatusMonitoring() function with the name of a class that implements the IMQTTDeviceStatusCallback interface.

    OnConnected

    This event is called when a device is connected to the MQTT broker.

    void OnConnected(String deviceAddress);
    Parameter
    Description

    Return Value: None

    This event is called when a device is disconnected from the MQTT broker.

    Parameter
    Description

    Return Value: None

    Introduction

    This document provides instructions for software developers who want to create Android software solutions that include MagTek devices connected to an Android based host. MagTek Universal SDK (MTUSDK) incorporates MagTek SCRA and MagTek PIN Pad SCRA devices into one SDK. This document is part of a larger library of documents designed to assist MagTek device implementers, which includes the following documents available from MagTek:

    • D998200383 DynaFlex Products Programmer's Manual ( Commands )

    The sample code provides Android demonstration source code and a reusable MTUSDK API library that provides developers of custom software solutions with an easy-to-use interface for MagTek devices.

    Developers can distribute the MTUSDK API Library to customers or distribute internally as part of an enterprise solution.

    Android

    The Android edition of the MagTek Universal SDK (MTUSDK), which brings MagTek SCRA and PIN Pad SCRA devices — including the DynaFlex family — into a single AAR library for Android apps. Use the sections below to set up the SDK, connect to and control a device through the Core API, subscribe to device events, and look up classes, enumerations, and reference appendices.

    Appendices

    Supplementary reference material for the MagTek Universal SDK, including the full status-code list, a step-by-step API walk-through, the EMV transaction flow, and integration guidance for mobile-wallet value-added services (Apple VAS and Google Wallet Smart Tap).

    Appendix E - Google Wallet Smart Tap VAS

    These instructions are for preparing Google Wallet Smart Tap VAS (value-added service) transactions.

    • Configure the mobile device for Google Wallet Smart Tap Pass.

    • Load the LTPK protection key (Long Term Private Key) into the MagTek device.

    • Upload a Public Key to the Google Pay & Wallet Console for the issuer account associate with the Google Wallet Pass.

    IConfigurationCallback Delegates

    MTUSDKNET API will invoke the callback function in this chapter to provide the requested data and/or a detailed response. These events will be called in a class that implements the IConfigurationCallback Delegates interface.

    This event is called when certain asynchronous IDeviceConfiguration operations need to be have a MAC included with the request.

    Copy

    Parameter
    Description

    Appendix D - Apple VAS

    These instructions are for preparing Apple VAS (value-added service) transactions.

    • Set the Apple VAS Merchant ID and URL property for each slot 1 to 6 using IDeviceControl --> setConfigInfo().

    • Set the POS capabilities property using IDeviceControl à setConfigInfo().

    Enumerations

    Reference for the enumerated types used throughout the MagTek Universal SDK — the named constants for values such as device and transaction states, card types, and command options that appear in SDK calls and results. The enumerations are listed alphabetically across two pages.

    ERROR

    Error attempting the operation.

    UNAVAILABLE

    Status currently unavailable.

    deviceAddress

    Device address.

    deviceAddress

    Device address.

    OnDisconnected

    void OnDisconnected(String deviceAddress);
    Device refers to the MagTek devices that receives and responds to command set.
  • Host refers to the piece of general-purpose electronic equipment the device is connected or paired to, which sends data to and receives data from the device. Host types include but not limited to PC and Mac computers, tablets, and smartphones. When “host” must be used differently, it is qualified as something specific, such as “USB host.”

  • User in this document generally refers to the cardholder.

  • File name
    Description

    MTUSDKDemo.apk

    Sample code APK file.

    MTUSDK.aar

    Universal SDK Android AAR Library file.

    Tested operating systems:

    • Android 4.4.2 and above

    • Android Studio 3.5.3 and above

    When connecting to the DynaFlex II PED device by WLAN, a client certificate and its certificate chain must be installed on the Android device. Root Certificate, Sub CA Certificate, and Client private key Certificate as referenced in document D998200550 DynaFlex II PED Using Wireless LAN Guide.

    1

    Download the certificate chain to the Android device.

    2

    The navigation paths for the following instructions may very on the Android device.

    If not seen, do a search within Settings for the end of the navigation path.

    3

    Navigate to Settings --> Security --> More security settings --> Encryption & credentials --> Install a certificate

    4
    5
    6
    7
    8
    9
    10
    11
    12

    Custom software will need the client private key certificate (client.p12) when creating a connection to DynaFlex II PED WLAN. Place the client.p12 into a folder accessible by the custom software.

    About the MagTek Sample Code

    Nomenclature

    SDK Contents

    System Requirements

    Certificate Requirements

    Instructions for adding the MTUSDK AAR library to an Android Studio project and preparing it for first use.

    The SDK's main entry point — how to create and work with a device instance and reach the interfaces used to operate it.

    The primary device interface for opening and closing a connection and sending commands to a MagTek device.

    Methods for querying which features and capabilities a connected device supports.

    Operations for controlling a connected device and driving its command set.

    The connection parameters used to locate and connect to a device (transport, address, and related settings).

    Identifying details reported by a connected device, such as model, serial number, and firmware version.

    Settings used to read and apply a device's configuration.

    Alphabetical reference for the SDK's data and result classes (Classes A–I and N–Z).

    Callback delegates for subscribing to asynchronous device events, such as connection changes and transaction progress.

    Callback delegates that report the results of device configuration operations.

    Callback delegates for receiving device status updates delivered over MQTT.

    Callback delegates for receiving system-level status updates from the SDK.

    Reference for the SDK's enumerated types (device and transaction states, card types, option flags).

    Supporting reference — status codes, an API walk-through, EMV transaction flow, and Apple/Google mobile-wallet VAS.

    Reference Section

    Information Available

    Introduction

    Overview of the SDK and the MagTek devices it supports, with system requirements and how to install the certificate chain for connecting to a DynaFlex II PED over WLAN.

    Universal SDK Documentation (Android)

    In This Section

    Need More Help

    Need Help?

    For additional support, please contact MagTek Support:

    Technical Support:

    • 📧 Email:

    A step-by-step walk-through of a typical integration, showing the API calls in sequence from connection through a completed transaction.

    The end-to-end EMV transaction sequence — the stages and SDK interactions involved in processing a chip-card payment.

    Guidance for using Apple Value Added Services to read Apple Wallet passes over contactless.

    Guidance for using Google Wallet Smart Tap to read passes and value-added service data over contactless.

    Reference Section

    Information Available

    A: Status Codes

    The complete list of status and result codes returned by the SDK, with their meanings for handling success and error conditions.

    Appendices

    In This Section

    Need More Help

    Need Help?

    For additional support, please contact MagTek Support:

    Technical Support:

    • 📧 Email:

    Set the Google Smart Tap Collector ID property for each slot 1 to 6 using IDeviceControl à setConfigInfo().

    • Set the POS capabilities property using IDeviceControl à setConfigInfo().

    • Set the PaymentMethods to include PaymentMethod.GoogleVAS.

    • Set AppleVASMode to: VASMode.Single, VASMode.Dual, or VASMode.VASOnly.

    • Data from a Google Wallet Smart Tap (DF7B) is returned in separate Collector ID slot containers associated with the Google Wallet Pass.

    Tag
    Length
    Value / Description

    FF41

    var

    Google Smart Tap Container

    //FF01

    Mobile Device

    Load Key

    Collector ID Slots

    POS Capabilities

    Start Transaction

    Transaction Response

    data

    Contains the data of the payload to MAC.

    Return Value:

    Returns an IResult that contains the calculated MAC.

    This event is called to update the host on the progress of an asynchronous IDeviceConfiguration operation.

    public void OnProgres(int progress);

    Parameter
    Description

    progress

    The progress of the configuration operation. Range: 0 - 100

    Return Value: None

    This event is called to update the host when an asynchronous IDeviceConfiguration operation is completed.

    Copy

    Parameter
    Description

    status

    An enumerated Library Status Codes.

    data

    Contains the data for the event.

    Return Value: None

    Example:

    Copy

    For the complete documentation index, see llms.txt. This page is also available as .

    IResult OnCalculateMAC( 
        byte macType, 
        byte[] data);

    macType

    OnCalculateMAC

    Type of Mac algorithm. For DynaFlex, use 0.

    public void OnResult( 
        StatusCode status, 
        byte[] data);
    class OnConfigCallbackClass implements IConfigurationCallBack
    {
        public IResult OnCalculateMAC(byte macType, byte[] data)
        {
            // Event handler
        }
    
        public void OnProgress(int progress)
        {
            // Event handler
        }
    
        public void OnResult(StatusCode status, byte[] data)
        {
            // Event handler
        }
    
    }
    
    OnConfigCallbackClass configCallBack = new OnConfigCallbackClass();

    OnProgress

    OnResult

    Set the PaymentMethods to include PaymentMethod.AppleVAS.

  • Set AppleVASMode to: VASMode.Single, VASMode.Dual, or VASMode.VASOnly.

  • Set AppleVASProtocol to: VASProtocol.Full or VASProtocol.URL.

    • Data from an Apple VAS (9F27 and 9F2A) is returned in separate Apple VAS slot containers.

    • FE — var — VAS Data Container

      • FF01 — var — Apple VAS Container Slot 1 Container

        • 9F27 — var — VAS Data. Up to 128 bytes.

        • 9F2A — var — Mobile Token. Up to 36 bytes.

      • FF02 — var — Apple VAS Container Slot 2 Container

        • 9F27 — var — VAS Data. Up to 128 bytes.

        • 9F2A

      • FF03 — var — Apple VAS Container Slot 3 Container

        • 9F27 — var — VAS Data. Up to 128 bytes.

        • 9F2A

      • FF04 — var — Apple VAS Container Slot 4 Container

        • 9F27 — var — VAS Data. Up to 128 bytes.

        • 9F2A

      • FF05 — var — Apple VAS Container Slot 5 Container

        • 9F27 — var — VAS Data. Up to 128 bytes.

        • 9F2A

      • FF06 — var — Apple VAS Container Slot 6 Container

        • 9F27 — var — VAS Data. Up to 128 bytes.

        • 9F2A

    Merchant ID and URL Slots

    POS Capabilities

    Start Transaction

    Transaction Response

    Reference for the SDK's enumerated types (device and transaction states, card types, option flags).

    Reference Section

    Information Available

    Enumerations B-E

    Reference for the SDK's enumerated types (device and transaction states, card types, option flags).

    Enumerations

    In This Section

    Need More Help

    Need Help?

    For additional support, please contact MagTek Support:

    Technical Support:

    • 📧 Email:

    Alphabetical reference for the SDK's data and result classes (Classes N–Z).

    Need More Help

    Need Help?

    For additional support, please contact MagTek Support:

    Technical Support:

    • 📧 Email: support@magtek.com

    • 📞 Phone: 1-562-546-6800 (US)

    • 🕐 Hours: Monday-Friday, 5:30 AM - 5:00 PM PST

    Online Resources:

    • 🌐 Support Portal: developer.magtek.com

    Documentation Feedback:

    Help us improve this documentation!

    Classes A-I
    Classes N-Z

    ConnectionInfo

    Create an instance of the ConnectionInfo using IDevice.getConnectionInfo(). Then use the function calls described in this chapter.

    getAddress

    This function returns address of the device.

    String ConnectionInfo.getAddress();

    Return Value:

    Returns the address of the device.

    getConnectionType

    This function returns the type of connection Interface for the device.

    ConnectionType ConnectionInfo.getConnectionType();

    Return Value:

    Returns the ConnectionType.

    getDeviceType

    This function returns the type for the device.

    DeviceType ConnectionInfo.getDeviceType();

    Return Value:

    Returns the DeviceFeature.

    This enum refers to a featured supported by the device.

    Enum
    Description
    —
    var
    — Mobile Token. Up to 36 bytes.
    —
    var
    — Mobile Token. Up to 36 bytes.
    —
    var
    — Mobile Token. Up to 36 bytes.
    —
    var
    — Mobile Token. Up to 36 bytes.
    —
    var
    — Mobile Token. Up to 36 bytes.

    var

    Collector ID Slot 1 Container

    ///DF7B

    var

    Service Response NDEF Record

    //FF02

    var

    Collector ID Slot 2 Container

    ///DF7B

    var

    Service Response NDEF Record

    //FF03

    var

    Collector ID Slot 3 Container

    ///DF7B

    var

    Service Response NDEF Record

    //FF04

    var

    Collector ID Slot 4 Container

    ///DF7B

    var

    Service Response NDEF Record

    //FF05

    var

    Collector ID Slot 5 Container

    ///DF7B

    var

    Service Response NDEF Record

    //FF06

    var

    Collector ID Slot 6 Container

    ///DF7B

    var

    Service Response NDEF Record

    Markdown
    feedback@magtek.com

    None

    No feature.

    SignatureCapture

    Supports signature capture

    PINEntry

    📞 Phone: 1-562-546-6800 (US)
  • 🕐 Hours: Monday-Friday, 5:30 AM - 5:00 PM PST

  • Online Resources:

    • 🌐 Support Portal: developer.magtek.com

    Documentation Feedback:

    Help us improve this documentation!

    How to Set Up the SDK
    Core API
    IDevice
    IDeviceCapabilities
    IDeviceControl
    ConnectionInfo
    DeviceInfo
    iDeviceConfiguration
    Classes
    IEventSubscriber Delegates
    IConfigurationCallback Delegates
    IMQTTDeviceStatusCallback Delegates
    ISystemStatusCallback Delegates
    Enumerations
    Appendices
    support@magtek.com
    📞 Phone: 1-562-546-6800 (US)
  • 🕐 Hours: Monday-Friday, 5:30 AM - 5:00 PM PST

  • Online Resources:

    • 🌐 Support Portal: developer.magtek.com

    Documentation Feedback:

    Help us improve this documentation!

    B: API Walk Through
    C: EMV Transaction Flow
    D: Apple VAS
    E: Google Wallet Smart Tap VAS
    support@magtek.com
    📞 Phone: 1-562-546-6800 (US)
  • 🕐 Hours: Monday-Friday, 5:30 AM - 5:00 PM PST

  • Online Resources:

    • 🌐 Support Portal: developer.magtek.com

    Documentation Feedback:

    Help us improve this documentation!

    Enumerations F-V
    support@magtek.com

    Select CA certificate .

    Confirm any prompts such as Install anyway .

    Select the rootCA.crt file.

    Continue to install the subCA by selecting CA certificate .

    Confirm any prompts such as Install anyway .

    Select the subCA.crt file.

    Verify the certificate chain by navigating to Settings --> Security --> More security settings --> Encryption & credentials --> Trusted credentials.

    Select User .

    Installation of certificate chain is complete.

    Supports PIN entry

    PANEntry

    Supports PAN entry

    ShowBarCode

    Supports display of a barcode

    ScanBarCode

    Supports scanning a barcode

    DisplayMessage

    Supports display of messages

    Buzzer

    Has a buzzer

    CardEmulation

    Supports NFC card emulation

    PersonalInfoEntry

    Supports personal info entry

    feedback@magtek.com
    feedback@magtek.com
    feedback@magtek.com

    Classes - N - Z

    NFCData

    These constructors initialize an NFCData object. Use NFCDataBuilder.GetNFCData with the data byte array from the NFCData event to return an NFCData.

    NFCData NFCDataBuilder.GetNFCData(deviceType, byte[] dataBytes); 
    new NFCData(byte[] Data, boolean Encrypted); 
    new NFCData(
        byte[] Data, 
        boolean Encrypted,
        byte EncryptionType, 
        byte[] KSN
        );
    Member
    Description

    Data()

    Returns the data payload.

    Encrypted()

    Return Value:

    Returns an instance of NFCData.

    These constructors initialize an NFCRAPDUData object. Use NFCDataBuilder.GetNFCRAPDUData with data byte array from the NFCRAPDUResponse event to return an NFCRAPDUData.

    Parameter
    Description

    Return Value:

    Returns an instance of NFCRAPDUData.

    This class assist in parsing NFCEvent data.

    Member
    Return
    Description
    Member
    Value
    Description

    These constructors initialize a PersonalInfoEntry object.

    • Call startPersonalInfoEntry().

    • At OnEvent():TouchscreenPersonalInfoEntry, build the object.

    Member
    Description

    Return Value:

    Returns an instance of PersonalInfoEntry.

    IDeviceConfiguration

    Create an instance of the IDeviceConfiguration using getDeviceConfiguration(). Then use the function calls described in this chapter.

    Generally, these functions will run in one of two modes:

    • Asynchronous functions return data in the event handlers in section.

    • Synchronous functions return data in the return value. If the data is not available immediately, the call will block until a wait time has elapsed.

    deleteFile

    This function deletes a file from the device.

    Copy

    int IDeviceConfiguration.deleteFile(byte[] fileID);

    Parameter

    • fileID Byte array for the file ID. For DynaFlex, use a 4-byte file id. 0x02000000 = Custom idle page image 1

      0x02000001 = Custom idle page image 2 0x02000002 = Custom idle page image 3 0x02000003 = Custom idle page image 4

    Return Value:

    Returns 0 if the asynchronous update operation started. Otherwise, returns a non 0 value.

    This function retrieves a challenge token from the device. A challenge token consists of a random nonce or timestamp. A challenge token must be used within the time allowed by the device (generally 5 minutes) of being issued. Only one token can be active at a time. Attempts to use a token for requests other than the one specified will cause the token to be revoked/erased.

    Copy

    Parameter

    • data Byte array containing the request ID to be protected.

    Return Value:

    Returns a byte array containing the challenge token.

    This function retrieves device configuration information.

    Copy

    Parameter

    • configType Type of configuration. For DynaFlex, this is the function ID.

    • data Configuration data to be sent to the device. For DynaFlex, this is the OID.

    Return Value:

    Returns an array of bytes containing the configuration information.

    This function retrieves device specific information.

    Copy

    Parameter

    • infoType Enumerated information type.

    Return Value:

    Returns a string value device information.

    This function retrieves device specific information.

    Copy

    Parameter

    • fileID Byte array for the file ID. For DynaFlex, use a 4-byte file id.

    • callback Name of a class or structure that implements the IConfigurationCallback Delegates events.

    Return Value:

    Returns a string value device information.

    This function retrieves key information.

    Copy

    Parameter

    • keyType Type of key. For DynaFlex, use 0.

    • data Key data to be sent to the device. For DynaFlex, this is the 2-byte key slot number.

    Return Value:

    Returns an array of bytes containing the key information.

    This function sends a file to the device.

    Copy

    Parameter

    • fileID Byte array for the file ID. For DynaFlex, use a 4-byte file id.

    • data File contents to be sent to the device.

    • callback Name of a class or structure that implements the IConfigurationCallback Delegates events.

    Return Value:

    Returns 0 if the asynchronous update operation started. Otherwise, returns a non 0 value.

    This function sends an image to the device.

    Copy

    Parameter

    • imageID Value for the image ID. For DynaFlex, use:

      1, 2, 3, or 4

    • data File contents to be sent to the device.

      Images must be BMP format, 160KB or smaller with no compression, maximum 320px by 240px, with color depth 16 color, 256 color, 16-bit color, 24-bit color. Images smaller than the maximum size are centered on the display. Note images at full screen size must be 16-bit color or lower to meet the size requirement.

      For details see D998200383 DynaFlex Family Programmer's Manual (Commands).

    Return Value:

    Returns 0 if the asynchronous update operation started. Otherwise, returns a non 0 value.

    This function sends a file to the device using a secure command structure.

    Copy

    Parameter

    • fileID Byte array for the file ID. For DynaFlex, use a 4-byte file id.

    • data File contents to be sent to the device.

    • callback Name of a class or structure that implements the IConfigurationCallback Delegates events.

    Return Value:

    Returns 0 if the asynchronous update operation started. Otherwise, returns a non 0 value.

    This function sets device configuration information.

    Copy

    Parameter

    • configType Type of configuration. For DynaFlex, this is the function ID.

    • data Configuration data to be sent to the device.

    • callback Name of a class or structure that implements the IConfigurationCallback Delegates events.

    Return Value:

    Returns 0 if the asynchronous configuration operation started. Otherwise, returns a non 0 value.

    This function sets which image is to be displayed when the device is idle.

    Copy

    Parameter

    • imageID Value for the image ID. For DynaFlex, use:

      0, 1, 2, 3, or 4

      Where 0 substitutes the “Welcome” screen.

    Return Value:

    Returns 0 if the asynchronous configuration operation started. Otherwise, returns a non 0 value.

    This function updates the device firmware.

    Copy

    Parameter

    • firmwareType Type of firmware. For DynaFlex, use:

      1 - Main App

    • data Firmware image to be sent to the device.

    • callback Name of a class or structure that implements the IConfigurationCallback Delegates events.

    Return Value:

    Returns 0 if the asynchronous update operation started. Otherwise, returns a non 0 value.

    This function updates key information in the device.

    Copy

    Parameter

    • keyType Type of key.

    • data Key data to be sent to the device.

    • callback Name of a class or structure that implements the IConfigurationCallback Delegates events.

    Return Value:

    Returns 0 if the asynchronous update operation started. Otherwise, returns a non 0 value.

    callback Name of a class or structure that implements the IConfigurationCallback Delegates events.

    getChallengeToken

    getConfigInfo

    getDeviceInfo

    getFile

    getKeyInfo

    sendFile

    sendImage

    sendSecureFile

    setConfigInfo

    setDisplayImage

    updateFirmware

    updateKeyInfo

    byte[] IDeviceConfiguration.getChallengeToken(byte[] data);
    byte[]IDeviceConfiguration.getConfigInfo(
        byte configType,
        byte[] data);
    String IDeviceConfiguration.getDeviceInfo(InfoType infoType);
    int IDeviceConfiguration.getFile( byte[] fileID, IConfigurationCallback callback);
    byte[]IDeviceConfiguration.getKeyInfo(
        byte keyType,
        byte[] data);
    int IDeviceConfiguration.sendFile(
        byte[] fileID,
        byte[] data, IConfigurationCallback callback);
    int IDeviceConfiguration.sendImage(
        byte imageID,
        byte[] data,
        IConfigurationCallback callback);
    int IDeviceConfiguration.sendSecureFile(
        byte[] fileID,
        byte[] data, IConfigurationCallback callback);
    int IDeviceConfiguration.setConfigInfo(
        byte configType,
        byte[] data, IConfigurationCallback callback);
    int IDeviceConfiguration.setDisplayImage(byte imageID);
    int IDeviceConfiguration.updateFirmware(
        ushort firmwareType,
        byte[] data,
        IConfigurationCallback callback);
    int IDeviceConfiguration.updateKeyInfo(
        byte keyType,
        byte[] data,
        IConfigurationCallback callback);

    Returns the encryption status. false = data is not encrypted true = data is encrypted

    EncryptionType()

    Returns the encryption type.

    KSN()

    Returns the Key Serial Number.

    NFCRAPDUData NFCRAPDU( 
        byte[] response, 
        byte[] data, 
        boolean encrypted, 
        );
        
    NFCRAPDUData NFCRAPDU(
        byte[] response, 
        byte[] data, 
        bool encrypted, 
        byte encryptionType, 
        byte[] ksn
        );
        
    NFCRAPDUData NFCDataBuilder.GetNFCRAPDUData( 
        DeviceType deviceType,
        byte[] dataBytes,
        );

    response

    Response data.

    data

    The data payload.

    encrypted

    GetDetail(string data)

    String

    Returns a string containing NFC detail.

    GetEventValue(string data)

    NFCEvent

    NFC_MIFARE_ULTRALIGHT

    String

    "nfc_mifare_ultralight"

    MIFARE_CLASSIC_1K

    PersonalInfoEntry PersonalInfoEntryBuilder.GetPersonalInfoEntry( 
    DeviceType deviceType, 
    byte[] dataBytes);
    
    new PersonalInfoEntry( 
        byte[] data, 
        CaptureType dataType, 
        bool encrypted,
        );
    
    new PersonalInfoEntry( 
        byte[] data, 
        CaptureType dataType, 
        bool encrypted, 
        byte encryptionType, 
        byte[] ksn 
        );

    deviceType

    Type of device.

    dataBytes

    Data to pass in after set from OnEvent().

    data()

    NFCRAPDUData

    NFCEventBuilder

    Static Members

    Static Values

    PersonalInfoEntry

    Encryption status. false = data is not encrypted true = data is encrypted

    encryptionType

    The encryption type.

    ksn

    The Key Serial Number.

    deviceType

    Device type.

    dataBytes

    Data bytes from the NFCAPDUResponse event.

    Returns the NFCEvent enumeration.

    GetString(NFCEvent value)

    String

    Returns a string representation of NFCEvent enumeration.

    String

    "mifare_classic_1k"

    MIFARE_CLASSIC_4K

    String

    "mifare_classic_4k"

    MIFARE_DESFIRE_LIGHT

    String

    “mifare_desfire_light”

    MIFARE_MINI

    String

    "mifare_mini"

    MIFARE_PLUS_EV1

    String

    "mifare_plus_ev1"

    MIFARE_PLUS_EV2

    String

    "mifare_plus_ev2"

    MIFARE_PLUS_SE

    String

    "mifare_plus_se"

    MIFARE_PLUS_X

    String

    "mifare_plus_x"

    MIFARE_DESFIRE_EV1

    String

    "mifare_desfire_ev1"

    MIFARE_DESFIRE_EV2

    String

    "mifare_desfire_ev2"

    MIFARE_DESFIRE_EV3

    String

    "mifare_desfire_ev3"

    MDL

    String

    "mdl"

    TAG_REMOVED

    String

    "tag_removed"

    FAILED

    String

    "failed"

    IO_FAILED

    String

    "io_failed"

    AUTHENTICATION_FAILED

    String

    "authentication_failed"

    Returns the data payload.

    dataType()

    Returns the capture type.

    encrypted()

    Returns the encryption status. false = data is not encrypted true = data is encrypted

    encryptionType()

    Returns the encryption type.

    ksn()

    Returns the Key Serial Number.

    CoreAPI

    Use the CoreAPI to create an IDevice. IDevice is the bases for the MagTek Universal SDK.

    If accessing a device specific API outside of MagTek Universal SDK, use the various functions in this section to create an instance of that device’s API. Once a device specific API is referenced, the associated library will need to be added into the application’s development project.

    createCMSDevice

    This function creates an instance of a CMS type of device.

    The API’s of MagTek Universal SDK do not apply. See D998200160 MagTek Common Message Structure (MTCMS) for the MTCMS API.

    MTDevice CoreAPI.createCMSDevice(Context context, Handler handler);

    Parameter

    • context — An instance of android.content.Context to allow SDK access to application-specific resources.

    • handler — An instance of android.os.Handler to allow SDK access to application-specific message queues.

    Return Value:

    Returns an MTDevice.

    This function creates an instance of IDevice. All API’s of MagTek Universal SDK can but utilized from IDevice.

    Parameter

    • context — An instance of android.content.Context to allow SDK access to application-specific resources.

    • deviceType — Enumerated device type.

    • connectionType — Enumerated connection type.

    Return Value:

    Returns an IDevice.

    This function creates an instance of an MMS type of device, DynaFlex Family.

    Parameter

    • context — An instance of android.content.Context to allow SDK access to application-specific resources.

    • deviceAdapter — Callback interface for MMS device messages.

    Return Value:

    Returns an MMXDevice.

    This function creates an instance of an MTPPSCRA type of device.

    The API’s of MagTek Universal SDK do not apply. See D998200078 IPAD, DynaPro, DynaPro Go, and DynaPro Mini PIN Encryption Devices Programmer’s Reference for the MTPPSCRA API.

    Parameter

    • context — An instance of android.content.Context to allow SDK access to application-specific resources.

    • handler — An instance of android.os.Handler to allow SDK access to application-specific message queues.

    Return Value:

    Returns an MTPPSCRA.

    This function creates an instance of a MTSCRA type of device.

    The API’s of MagTek Universal SDK do not apply. See D99875723 uDynamo, Dynamag, DynaMAX, eDynamo, mDynamo, Insert, DynaWave, iDynamo 6 for the MTSCRA API.

    Parameter

    • context — An instance of android.content.Context to allow SDK access to application-specific resources.

    • handler — An instance of android.os.Handler to allow SDK access to application-specific message queues.

    Return Value:

    Returns an MTSCRA.

    This function returns a list of IDevice. IDevice is the base for utilizing the MagTek Universal SDK interface.

    Parameter

    • context — An instance of android.content.Context to allow SDK access to application-specific resources.

    • deviceType — An enum for the type of MagTek readers which the SDK will control.

    • deviceTypes — An enum list for the type of MagTek readers which the SDK will control.

    Return Value:

    Returns a list of IDevice

    This function returns the API version.

    Return Value:

    Returns an integer representing the API version.

    This function sets the MQTT (Message Queuing Telemetry Transport) broker information. Call prior to device discovery.

    Parameter

    • uri — URI included the port. Support URIs:

      1. TCP: test.mosquitto.org, test.mosquitto.org:1883, mqtt://test.mosquitto.org:1883, mqtt://broker.emqx.io:1883

    Return Value: None

    This function sets the MQTT client ID to establish a connection.

    Parameter

    • clientID — Client ID. If not set, the default value is [HostName]-[RandomUUID]

    Return Value: None

    This function sets the MQTT certificate information.

    Parameter

    • certificateInfo — If client certificate is required when initiating a connection to the MQTT broker, this shall be used to establish the connection. If not set, the default value is NULL.

    Return Value: None

    This function sets the MQTTDeviceDiscoveryTimeout value.

    Parameter

    • timeout — Time out in milliseconds. Default value = 5000 if not set. A call to getDeviceList() does not return the list until this time has expired.

    Return Value: None

    This function sets the MQTT callback interface instance.

    After connecting to the MQTT broker, the MQTT Device Status Monitoring subscribes to

    "<MQTTSubscribeTopic>/#" . The wildcard "/#" is automatically appended.

    Example:

    When a device status updates to “connected” or “disconnected”, OnConnected() and OnDisconnected() are invoked respectively.

    This method can be called whether or not there is an active connection to an MQTT device.

    Devices reporting with "/Status/connected" are added to the device list as follows:

    Parameter

    • callback — Name of a class or structure that implements the IMQTTDeviceStatusCallback interface events. Call after calling getDeviceList().

    Return Value: None

    This function sets the base value for MQTTPublishTopic. When connected to the MQTT broker, the composed topic is in the format:

    Example:

    • Base topic = “MagTek/Device/DynaFlexIIPED/”

    • Full topic = “MagTek/Device/DynaFlexIIPED/B51E72D/MMSMessage”

    Parameter

    • topic — Base topic for which to publish messages. Full topic is composed by the SDK.

    Return Value: None

    This function sets the MQTTQoS value.

    Parameter

    • qos — The quality of service level for publishing messages. Range:

      • 0 = At most once (default)

      • 1 = At least once

      • 2 = Exactly once

    Return Value: None

    This function sets the base value for MQTTSubscribeTopic. When connected to the device, the composed topic is in the format:

    “<basetopic>/<DeviceID>/MMSMessage”.

    Example:

    • Base topic = “MagTek/Server/DynaFlexIIPED/”

    • Full topic = “MagTek/Server/DynaFlexIIPED/B51E72D/MMSMessage”

    Parameter

    • topic — Base topic for which to subscribe for messages.

    Return Value: None

    This function stops the MQTT device status monitoring process. If called when already running, the process shall be stopped immediately. This method can be called whether or not there is an active connection to an MQTT device.

    Return Value: None

    This function sets the SystemStatusCallback global value.

    Parameter

    • callback — Name of a class or structure that implements the ISystemStatusCallback interface event. Call before starting any MQTT communication. When there is an error, the interface’s OnError() event is invoked.

    Return Value: None

    address — Address for the device.

    For USB devices, address may be an empty string when only one device is attached. Otherwise address should be in the form:

    USB://DEVICESERIALNUMBER

    for example, USB://99261829170E0810

    For Ethernet devices, address should be in the form:

    IP://IP-Address:PORT

    for example, IP://10.57.10.180:26

    For Wireless devices, address should be in the form:

    TLS12://TLSDEVICESERIALNUMBER TLS12TRUST://TLSDEVICESERIALNUMBER

    for example, TLS12://TLS99261829170E0810 TLS12TRUST://TLS99261829170E0810

    For Bluetooth LE devices, address should be in the form:

    BLEEMV://DEVICENAME

    for example, BLEEMV://DynaPro Go-EB66

    For WebSocket or Secure WebSocket devices, address should be in the form:

    ws://IP-Address wss://IP-Address

    for example:

    ws://192.168.1.150 or serialnumber.xx wss://serialnumber.xx (where xx is domain name)

    Place the client private key certificate (client.p12) into a folder accessible by the custom software.

    For Serial devices, address should be in the form:

    PORT=[PORT], BAUDRATE=[BAUDRATE], DATABITS=[DATABITS], PARITY=[PARITY], STOPBITS=[STOPBITS], HANDSHAKE=[HANDSHAKE], STARTINGBYTE=[STARTINGBYTE], ENDINGBYTE=[ENDINGBYTE], CRCMODE=[CRCMODE]

  • model — Model name for the device.

  • name — Unique name for the device to distinguish between multiple devices of the same model.

  • serial — Serial number for the device.

  • certificateInfo — The client private key certificate (client.p12) into a folder accessible by the custom software. See Certificate Requirements.

  • deviceListCallback — Callback interface for SDK to provide a list of device information in the system.

    TCP (Authenticated): test.mosquitto.org:1884, mqtt://test.mosquitto.org:1884
  • TCP (Encrypted): mqtts://test.mosquitto.org:8886, mqtts://broker.emqx.io:8883

  • TCP (Encrypted & Authenticated): mqtts://test.mosquitto.org:8885

  • WebSocket: ws://test.mosquitto.org:8080, ws://broker.emqx.io:8083

  • WebSocket (Encrypted): wss://test.mosquitto.org:8081, wss://broker.emqx.io:8084

  • WebSocket (Authenticated): ws://test.mosquitto.org:8090

  • WebSocket, (Encrypted & Authenticated):

  • wss://test.mosquitto.org:8091

  • username — Username

  • password — Password

  • createDevice

    createMMSDevice

    createPPSCRA

    createSCRA

    getDeviceList

    getAPIVersion

    setMQTTBrokerInfo

    setMQTTClientID

    setMQTTClientCertificateInfo

    setMQTTDeviceDiscoveryTimeout

    startMQTTDeviceStatusMonitoring

    setMQTTPublishTopic

    setMQTTQos

    setMQTTSubscribeTopic

    stopMQTTDeviceStatusMonitoring

    setSystemStatusCallback

    IDevice CoreAPI.createDevice( 
        Context context, 
        DeviceType deviceType,
        ConnectionType connectionType, 
        String address,
    String model, String name, String serial,
    CertificateInfo certificateInfo);
    MMXDevice CoreAPI.createMMSDevice( Context context, IMMXDeviceAdapter deviceAdapter);
    MTPPSCRA CoreAPI.createPPSCRA(Context context, Handler handler);
    MTSCRA CoreAPI.createPPSCRA(Context context, Handler handler);
    List<IDevice> CoreAPI.getDeviceList( 
        Context context,
        IDeviceListCallback deviceListCallback);
    
    List<IDevice> CoreAPI.getDeviceList( 
        Context context,
        DeviceType deviceType, 
        IDeviceListCallback deviceListCallback);
    
    List<IDevice> CoreAPI.getDeviceList( 
        Context context, 
        List<DeviceType> deviceTypes,
        IDeviceListCallback deviceListCallback);
    int CoreAPI.getAPIVersion();
    void setMQTTBrokerInfo(String uri);
    
    void setMQTTBrokerInfo( 
        String uri,
        String username = null, 
        String password = null);
    void setMQTTClientID(String clientID);
    void setMQTTClientCertificateInfo(CertificateInfo certificateInfo);
    void setMQTTDeviceDiscoveryTimeout(int timeout);
    subscribe topic = “MagTek/Server/DynaFlexIIPED” monitored subscription = “MagTek/Server/DynaFlexIIPED/#”.
    <DeviceAddress>=“MagTek/Server/DynaFlexIIPED/B51E72D”
    void startMQTTDeviceStatusMonitoring( 
        IMQTTDeviceStatusCallback callback); 
    “<basetopic>/<DeviceID>/MMSMessage”.
    void setMQTTPublishTopic(String topic);
    void setMQTTQos(int qos);
    void setMQTTSubscribeTopic(String topic);
    void stopMQTTDeviceStatusMonitoring();
    void setSystemStatusCallback(ISystemStatusCallback callback);

    Appendix C - EMV Transaction Flow

    This section demonstrates transaction flow.

    Flow Chart - QuickChip

    Sample Code - QuickChip

    The following breaks out the EMV flow chart into code. When enabling QuickChip mode, host does not send the ARPC to the device to complete the transaction. Events are shown separately and in the order received.

    // Assign parameters.
    List<PaymentMethod> paymentMethod = new List<PaymentMethod>(); 
    paymentMethod.Add(PaymentMethod.MSR); 
    paymentMethod.Add(PaymentMethod.Contact); 
    paymentMethod.Add(PaymentMethod.Contactless);
    
    Transaction transaction = new Transaction(); 
    transaction.setAmount(“1.00”); 
    transaction.setCashBack(“0.00”); 
    transaction.setEMVOnly(true); 
    transaction.setPaymentMethods(paymentMethod); 
    transaction.setQuickChip(true); // QuickChip mode enabled.
    
    // Start transaction.
    boolean result = device.startTransaction(transaction);
    public void OnEvent(EventType eventType, IData data)
    {
        String message 
        switch (eventType);
            {
                case EventType.DisplayMessage:
                    // Get the message.
                    message = data.StringValue();
        }
    }
    public void OnEvent(EventType eventType, IData data)
    {
        String message; 
        switch (eventType);
            {
                case EventType.InputRequest:
                // Get the message.
                message = data.StringValue();
    
                // display/retrieve user selection.
    
                // set status and selection result.
                IData selectionData = new BaseData(new Byte[] {status, selection});
                device.sendSelection(selectionData);
        }
    }
    public void OnEvent(EventType eventType, IData data)
    {
    byte[] ARQC = null; 
    switch (eventType);
        {
            case EventType.AuthorizationRequest:
                // Forward ARQC to processor.
                /* data[0..1] – ARQC length
                    data[2..n] – remainder contains the ARQC TLV object */
        }
    }
    public void OnEvent(EventType eventType, IData data)
    {
        String message; 
        switch (eventType);
            {
            
                case EventType.TransactionResult:
                    /* data[0]	– Signature Required 
                        data[1..2] – Batch Data length
                        data[3..n] – remainder contains the Batch Data TLV object
                    */
    
                    // Parse the TLV from data[].
                    // Abstract Approval status from TLV tag “DFDF1A”.
                    // Abstract Signature Required status from TLV tag data[0].
            }
    }

    Flow Chart – Signature Capture

    Sample Code – Signature Capture

    The following breaks out the EMV flow chart into code. Events are shown separately and in the order received.

    // Assign parameters.
    List<PaymentMethod> paymentMethod = new List<PaymentMethod>(); 
    paymentMethod.Add(PaymentMethod.MSR); 
    paymentMethod.Add(PaymentMethod.Contact); 
    paymentMethod.Add(PaymentMethod.Contactless);
    
    Transaction transaction = new Transaction(); 
    transaction.setAmount(“1.00”); 
    transaction.setCashBack(“0.00”); 
    transaction.setEMVOnly(true); 
    transaction.setPaymentMethods(paymentMethod); 
    transaction.setQuickChip(true);
    
    // Start transaction.
    boolean result = device.startTransaction(transaction);
    public void OnEvent(EventType eventType, IData data)
    {
        String message; 
        switch (eventType);
            {
                case EventType.DisplayMessage:
    
                    // Get the message.
                    message = data.StringValue();
        }
    }
    public void OnEvent(EventType eventType, IData data)
    {
        byte[] ARQC = null; 
        switch (eventType);
            {
                case EventType.AuthorizationRequest:
                    // #4a
                    // Forward ARQC to processor.
                    /* data[0..1] – ARQC length
                        data[2..n] – remainder contains the ARQC TLV object */
            }
    }
    public void OnEvent(EventType eventType, IData data)
    {
        String message; 
        switch (eventType);
            {
                case EventType.DisplayMessage:
                    // Display approval message. 
                    message = data.StringValue();
    
                    // A data size of 0 is an instruction to clear the display. 
                    if (data.StringValue().Length == 0)
                    {
                        // Clear the UI display.
                    }
            }
    }
    public void OnEvent(EventType eventType, IData data)
    {
        String message; 
        switch (eventType);
            {
                case EventType.TransactionResult:
                    /* data[0]	– Signature Required 
                    data[1..2] – Batch Data length
                    data[3..n] – remainder contains the Batch Data TLV object
                    */
    
                    // Parse the TLV from data[].
                    // Abstract Approval status from TLV tag “DFDF1A”.
                    // Abstract Signature Required status from TLV tag data[0].
            }
    }
    public void OnEvent(EventType eventType, IData data)
    {
        String signature; 
        switch (eventType);
            {
                case EventType.Signature: 
                    signature = data.StringValue();
            }
    }

    Flow Chart – With ARPC

    Sample Code – With ARPC

    The following breaks out the EMV flow chart into code. When disabling QuickChip mode, host must send the ARPC to the device to complete the transaction. Events are shown separately and in the order received.

    // Assign parameters.
    List<PaymentMethod> paymentMethod = new List<PaymentMethod>(); 
    paymentMethod.Add(PaymentMethod.MSR); 
    paymentMethod.Add(PaymentMethod.Contact); 
    paymentMethod.Add(PaymentMethod.Contactless);
    
    Transaction transaction = new Transaction(); 
    transaction.setAmount(“1.00”); 
    transaction.setCashBack(“0.00”); 
    transaction.setEMVOnly(true); 
    transaction.setPaymentMethods(paymentMethod); 
    transaction.setQuickChip(false); //QuickChip mode disabled.
    
    // Start transaction.
    boolean result = device.startTransaction(transaction);
    public void OnEvent(EventType eventType, IData data)
    {
        string message; 
        switch (eventType);
            {
                case EventType.DisplayMessage:
    
                    // Get the message.
                    message = data.StringValue;
        }
    }
    public void OnEvent(EventType eventType, IData data)
    {
        string message; 
        switch (eventType);
            {
                case EventType.InputRequest:
                    // Get the message.
                    message = data.StringValue;
    
                    // display/retrieve user selection.
    
                    // set status and selection result.
                    IData selectionData = new BaseData(new Byte[] {status, selection});
    device.sendSelection(selectionData);
        }
    }
    public void OnEvent(EventType eventType, IData data)
    {
        byte[] ARQC = null; 
        switch (eventType);
            {
                case EventType.AuthorizationRequest:
                    // Forward the ARQC to the processor.
                    /* data[0..1] – ARQC length
                    data[2..n] – remainder contains the ARQC TLV object */
    
                    ARQC.ByteArray = data.ByteArray;
                    // App function to send the request to the processor. 
                    ARPC = sendARQCToProcessorForApproval(ARQC.ByteArray());
    
            }
    }

    After the ARPC is returned from the processor, it is constructed into a TLV container and then sent to the device. The ARPC for approved (00) is set in ASCII 3030.

    The optional tags 91, 71, and 72 (Issuer Authentication Data, Issuer Script Template 1, and Issuer Script Template 2) are not included in this example.

    See the construction of the ARPCTLV in the table below.

    ARPC TLV object for sendAuthorization().

    Tag
    Len
    Value / Description
    Typ
    Req
    Default

    The use case for an MSR fallback is when communication with the chip results in a terminated transaction and the TransactionStatus is reported as MSRFallback.

    The host application will re-attempt the transaction. To invoke this use case, here are the following pre-requisites.

    Pre-requisites:

    • Device already configured for Device-Driven Fallback = Disabled.

    • A card to cause the fallback. Example but not limited to a card with no applications programmed or a card with an application not configured on the device.

    Scheme:

    • -->Host begins an initial transaction with PaymentMethod set to MSR+Chip+Contactless.

    • <--Device responds with fail and with status of MSRFallback.

    • -->Host displays a message to use magstripe.

    • -->Host starts a transaction with PaymentMethod set to MSR.

    Begin initial transaction:

    Continue with Fallback transaction:

    R

    /DFDF25

    var

    Device Serial Number (IFD Serial Number)

    B

    R

    /FA

    var

    Container for generic data

    T

    R

    //70

    var

    Container for ARPC

    T

    R

    ///8A

    02

    Authorization Response Code

    AN

    R

    · 0x3030 = Approved · 0x3031 = Issuer Referral · 0x3035 = Declined · 0x3132 = Switch Interface · 0x3133 = Request Online PIN

    ///91

    var

    Issuer Authentication Data

    B

    O

    As defined in EMV Integrated Circuit Card Specifications for Payment Systems 4.3

    ///71

    var

    Issuer Script Template 1

    B

    O

    As defined in EMV Integrated Circuit Card Specifications for Payment Systems 4.3. The host may include as many instances of this parameter as needed, up to a maximum length of 128 bytes including Tags and Lengths.

    ///72

    var

    Issuer Script Template 2

    B

    O

    As defined in EMV Integrated Circuit Card Specifications for Payment Systems 4.3. The host may include as many instances of this parameter as needed, up to a maximum length of 128 bytes including Tags and Lengths.

    <--Device may respond with transaction cancelled card read error.

  • -->Host displays a message each time the transaction fails until successful or until Host decides to end the transaction.

  • <--Device sends the transaction result.

  • String ARPC = “8A3030”;
    IData ARPCTLV = new BaseData(“FF7413DFDF250742363243413546FA067004” + ARPC);
    
    device.sendAuthorization(ARPCTLV);

    FF74

    var

    Container for non-MAC ARPC

    public void OnEvent(EventType eventType, IData data)
    {
        String message; 
        switch (eventType);
            {
                case EventType.DisplayMessage:
                    // Display approval message. 
                    message = data.StringValue();
    
                    // A data size of 0 is an instruction to clear the display. 
                    if (data.StringValue().Length == 0)
                    {
                        // Clear the UI display.
                    }
            }
    }
    public void OnEvent(EventType eventType, IData data)
    {
        String message; 
        switch (eventType);
            {
                case EventType.TransactionResult:
                    /* data[0]	– Signature Required 
                    data[1..2] – Batch Data length
                    data[3..n] – remainder contains the Batch Data TLV object
            */
    
            // Parse the TLV from data[].
            // Abstract Approval status from TLV tag “DFDF1A”.
            // Abstract Signature Required status from TLV tag data[0].
        }
    }
    public void OnEvent(EventType eventType, IData data)
    {
        String signature; 
        switch (eventType);
            {
                case EventType.Signature: 
                    signature = data.StringValue();
            }
    }

    MSR Fallback Flow

    T

    Appendix B - API Walk Through

    CoreAPI Walk Trough

    The following walks through how to create instances of devices.

    • CoreAPI.createDevice à IDevice

    • CoreAPI.getDeviceList à List

    • CoreAPI.createPPSCRA à MTPPSCRA

    These examples demonstrate methods for creating an IDevice to be used in the MagTek Universal SDK. This also shows how to establish a device specific API, which is not used with the MagTek Universal SDK.

    Here, a single IDevice is established.

    Here, a list of IDevice is established. The first device is accessed at index 0.

    The following walks through how to make use of IDevice.

    • Implement device events within the class to receive events.

    • CoreAPI à IDevice.

    • IDevice à subscribeAll().

    • IDevice à other functions.

    Example

    Application Main window may extent the

    Static
    Member
    Value
    Description

    These constructors initialize a PersonalInfoEntry object.

    • Call startPersonalInfoEntry().

    • At OnEvent():TouchscreenPersonalInfoEntry, build the object.

    Member
    Description

    Return Value:

    Returns an instance of PersonalInfoEntry.

    IEventSubscriber Delegates or can be extended by a separate class. This example uses a separate class and demonstrates how to parse for the various event types.

    Example

    Various events are separately shown below

    The following walks through how to make use of IDeviceControl.

    • IDevice --> IDeviceControl.· IDeviceControl à open().

    • IDeviceControl --> other functions.

    • IDeviceControl --> close().

    Example

    The following walks through how to make use of ConnectionInfo.

    • IDevice --> ConnectionInfo.

    • ConnectionInfo --> getAddress()

    • ConnectionInfo --> getConnectionType()

    • ConnectionInfo --> getDeviceType() Example

    Example

    The following walks through how to make use of IDeviceCapabilities.

    • IDevice à IDeviceCapabilities.

    • IDeviceCapabilities à BatteryBackedClock() to check if date/time should be set.

    • IDeviceCapabilities à PaymentMethods() to check card types supported.

    • IDeviceCapabilities à other functions.

    The following walks through how to make use of IDeviceConfiguration.

    • IDevice --> getDeviceConfiguration().

    • IDeviceConfiguration --> updateFirmware().

    • IDeviceConfiguration --> getConfiguration().

    • IDeviceConfiguration --> setConfiguration().

    Example

    Application Main window may extent the IConfigurationCallback Delegates or can be extended by a separate class. This example uses a separate class and demonstrates how to parse for the various events.

    Example

    Enumerations - B - E

    BarCodeFormat

    This enum refers to the type of barcodes to display.

    Enum
    Description

    BLOB

    Data is binary format

    COMMAND

    This enum refers to the type of barcodes to display.

    Enum
    Description

    This enum refers to the type of customer information to capture.

    Enum
    Description

    This enum refers to the readiness of the SDK to communicate with the device. This is not the physical attachment to a host system.

    Enum
    Description

    This enum refers to the communication interface type of MagTek reader which the SDK will control.

    Enum
    Description

    This enum is reserved for future use.

    Enum
    Description

    This enum refers to a change in the device status.

    Enum
    Description

    This enum refers to a featured supported by the device.

    Enum
    Description

    This enum refers to the type of MagTek reader which the SDK will control.

    Enum
    Description

    This enum refers to the type of connection error.

    Enum
    Description

    This enum refers to the type of event triggered by the device.

    Enum
    Description

    IDevice

    This function cancels a transaction. A transaction can only be cancelled before a card is presented.

    Return Value: Returns true if cancelled. Otherwise, returns false.

    This function retrieves the capabilities of the device.

    Return Value: Returns IDeviceCapabilities

    This function retrieves the connection information of the device.

    Return Value: Returns ConnectionInfo

    This function retrieves the connection state of the device.

    Return Value: Returns CaptureType

    ZipCode

    Capture the zip code

    EmployeeID

    Capture Employee ID number

    BirthDate

    Capture birth date in USA format

    Error

    There was an error either connecting or disconnecting the device.

    Connected

    Device is connected and ready for transacting.

    Disconnecting

    Device is in the process of disconnecting. The next state will is to be Disconnected.

    BLUETOOTH_LE_EMVT

    Bluetooth Low Energy with EMV supported devices: · tDynamo

    TCP

    Transmission Control Protocol supported devices: · DynaPro

    TCP_TLS

    Transmission Control Protocol with Transport Layer Security supported devices: · DynaPro Go

    TCP_TLS_TRUST

    Transmission Control Protocol with Transport Layer Security supported devices: · DynaPro Go

    WEBSOCKET

    WebSocket supported devices: · DynaFlex Pro · DynaFlex II PED

    WEBSOCKET_TRUST

    WebSocket supported devices. This will establish a TLS connection to device without requirement for name match. · DynaFlex Pro · DynaFlex II PED

    SERIAL

    UART supported devices

    AIDL

    AIDL devices: · DynaGlass

    VIRTUAL

    Virtual devices

    MQTT

    MQTT · DynaFlex II PED

    ZIPCODE

    Request Zip code

    BirthDate

    Request Birth date

    ActivationCode

    Request Activation code

    DeviceBondingFailure

    Host fails to pair with device.

    DeviceTemperatureLow

    The device’s temperature falls below the temperature set in Low Temperature Notification Level.

    DeviceTemperatureHigh

    The device’s temperature rises below the temperature set in High Temperature Notification Level.

    DeviceBatteryLow

    The battery charge reaches 15 percent. If a device is powered on with a charge that is already 15 percent or below, this notification is sent shortly after power up.

    DeviceBatteryLowPowerDown

    This notification is sent one minute before it automatically powers down the device. This occurs when the battery charge has reached 0 percent. Shutdown can be prevented by connecting the device to a USB power source.

    PANEntry

    Supports PAN entry

    ShowBarCode

    Supports display of a barcode

    ScanBarCode

    Supports scanning a barcode

    DisplayMessage

    Supports display of messages

    Buzzer

    Has a buzzer

    CardEmulation

    Supports NFC card emulation

    PersonalInfoEntry

    Supports personal info entry

    MMS

    Apollo class devices. List includes but not limited to: * DynaFlex * DynaFlex Pro * DynaProx

    BluetoothUnauthorized

    Bluetooth not paired.

    NetworkOff

    Network is off.

    NetworkUnreachable

    Network is unreachable.

    SecurityRejected

    Security rejected.

    SecurityFailed

    Security failed.

    ConnectionFailed

    Connection failed.

    DeviceExtendedResponse

    Device has responded to an extended command.

    DeviceNotification

    Device has sent a notification.

    CardData

    Device has sent magnetic stripe data from a card swipe.

    TransactionStatus

    There was a change in transaction status.

    DisplayMessage

    Device has a message to display for the user.

    ClearDisplay

    Device has notified to clear the display of user messages on host app.

    InputRequest

    Device is requesting input from the user.

    EnhancedInputRequest

    Device is requesting input for enhanced application selection in response to entering the card’s payment system environment.

    AuthorizationRequest

    Device has sent the Authorization Request Cryptogram and associated block of EMV tags for a transaction. This block is meant to be sent to the transaction processor.

    TransactionResult

    Device has sent the result of the transaction.

    PINBlock

    Device has sent the PINBlock after the user has entered a PIN on the device.

    Signature

    Device has sent data which represents a signature from a user.

    DeviceDataFile

    Device has sent a data file.

    OperationStatus

    Device has sent an operation status of a command.

    DeviceEvent

    Device has sent change of device state.

    UserEvent

    Device has sent a notification related to user interaction with the device.

    FeatureStatus

    Device has sent status of a feature.

    PINData

    Device has sent data related to a PIN.

    PANData

    Device has sent data related to a PAN.

    BarCodeData

    Device has sent barcode data.

    NFCEvent

    Device has sent NFC event.

    NFCData

    Device has sent NFC data.

    NFCResponse

    Device has sent response to and NFC command.

    NFCAPDUResponse

    Device has sent response to an NFC APDU command for Mifare DESFire Tag.

    NFCCardData

    Device has sent NFC card data.

    NFCDeviceEngagementData

    Device has sent data after NFC engagement.

    NFCPassThroughData

    Device has sent NFC Pass-Through data.

    NFCPassThroughResponse

    Device has sent a response to NFC Pass- Through exchange.

    GPOResponse

    Device has GPO response.

    TouchscreenSignatureCapture

    Device has sent response to signature capture.

    TouchscreenFunctionalButtonSelected

    Device has sent a notification of a functional button selected.

    TouchscreenTextStringButtonSelected

    Device has sent a notification of a test string button selected.

    TouchscreenAmountButtonSelected

    Device has sent a notification of an amount button selected.

    TouchscreenPresentCardFunctionalBut tonSelected

    Device has sent a notification of a present card functional button selected.

    TouchscreenPersonalInfoEntry

    Device has sent a personal info entry.

    Data is a command in binary format

    BLOB_BASE64

    Data is Base64 encoded format

    COMMAND_BASE64

    Data is a command in Base64 format

    QRCODE

    QR code

    Unavailable

    Capture unavailable

    PhoneNumber

    Capture the phone number

    SocialSecurityNumber

    Unknown

    Device is in an unknown connection state.

    Disconnected

    Device is disconnected.

    Connecting

    USB

    Universal Serial Bus supported devices: · eDynamo · DynaPro · mDynamo · DynaPro Go · Dynamag · DynaPro Mini · DynaMax · DynaFlex · tDynamo · DynaFlex Pro · kDynamo · DynaFlex II PED · cDynamo · DynaProx · iDynamo 6 · DynaFlex II Go

    BLUETOOTH_LE

    Bluetooth Low Energy devices: · DynaMax · DynaFlex II Go

    BLUETOOTH_LE_EMV

    PIN

    Request Personal Identification Number

    Signature

    Request Signature

    SSN

    None

    No event to report.

    DeviceResetOccured

    A device reset had occurred.

    DeviceResetWillOccur

    None

    No feature.

    SignatureCapture

    Supports signature capture

    PINEntry

    SCRA

    Secure Reader Authenticator devices. List includes but not limited to: * eDynamo * mDynamo * Dynamag * DynaMax * tDynamo * kDynamo * cDynamo * iDynamo 6

    PPSCRA

    PIN Pad Secure Reader Authenticator devices. List includes but not limited to: * DynaPro * DynaPro Go * DynaPro Mini

    CMF

    Unknown

    Device is in an unknown connection state.

    TimedOut

    Device has timed out.

    BluetoothOff

    ConnectionState

    There was a change in the connection state of the device.

    DeviceResponse

    Device has responded to a command.

    BarCodeType

    CaptureType

    ConnectionState

    ConnectionType

    DataEntryType

    DeviceEvent

    DeviceFeature

    DeviceType

    ErrorType

    EventType

    Capture the social security number

    Device is in the process of connecting. The next state is to be Connected.

    Bluetooth Low Energy with EMV supported devices: · eDynamo

    Request Social security number

    A device reset will occur soon. Host application may uses this as a warning to take appropriate actions.

    Supports PIN entry

    Common Message Structure devices. List includes but not limited to: * oDynamo

    Bluetooth is off.

    IDevice à startTransaction().

    MIFARE_CLASSIC_1K

    String

    "mifare_classic_1k"

    MIFARE_CLASSIC_4K

    String

    "mifare_classic_4k"

    MIFARE_DESFIRE_LIGHT

    String

    "mifare_desfire_light"

    MIFARE_MINI

    String

    "mifare_mini"

    MIFARE_PLUS_EV1

    String

    "mifare_plus_ev1"

    MIFARE_PLUS_EV2

    String

    "mifare_plus_ev2"

    MIFARE_PLUS_SE

    String

    "mifare_plus_se"

    MIFARE_PLUS_X

    String

    "mifare_plus_x"

    MIFARE_DESFIRE_EV1

    String

    "mifare_desfire_ev1"

    MIFARE_DESFIRE_EV2

    String

    "mifare_desfire_ev2"

    MIFARE_DESFIRE_EV3

    String

    "mifare_desfire_ev3"

    MDL

    String

    "mdl"

    TAG_REMOVED

    String

    "tag_removed"

    FAILED

    String

    "failed"

    IO_FAILED

    String

    "io_failed"

    AUTHENTICATION_FAILED

    String

    "authentication_failed"

    dataType()

    Returns the capture type.

    encrypted()

    Returns the encryption status. false = data is not encrypted true = data is encrypted

    encryptionType()

    Returns the encryption type.

    ksn()

    Returns the Key Serial Number.

    IDeviceConfiguration --> other functions.

    NFC_MIFARE_ULTRALIGHT

    String

    "nfc_mifare_ultralight"

    deviceType

    Type of device.

    dataBytes

    Data to pass in after set from OnEvent().

    data()

    IDevice Walk Through

    Handling Events

    Static members

    PersonalInfoEntry

    IDeviceControl Walk Through

    ConnectionInfo Walk Through

    IDeviceCapabilities Walk Through

    IDeviceConfiguration Walk Through

    Handling Events

    Returns the data payload.

    // Access MMS with Universal SDK using createDevice()
    
    IDevice mtmms = CoreAPI.createDevice( 
        context,
        DeviceType.MMS, 
        ConnectionType.USB, "",
        "",
        "DynaFlex", 
        "");
    mtmms.requestSignature();
    // Acess MMS with Universal SDK using getDeviceList()
    
    List<IDevice> mtmms = CoreAPI.getDeviceList( 
        context,
        DeviceType.MMS, 
        deviceListCallback);
    mtmms[0].requestSignature();
    import com.magtek.mobile.android.mtusdk.*;
    
    
    // Extend the main window to receive events.
    public class MainWindow implements IEventSubscriber, 
    IConfigurationCallback
    {
    
    // Establish a device from CoreAPI. List<IDevice> deviceList = CoreAPI.getDeviceList(
        context, 
        deviceListCallbac);
    IDevice device = deviceList[0];
    
    /* For a list of a single device type. DeviceType deviceType = DeviceType.MMS;
    List<IDevice> deviceList = CoreAPI.getDeviceList( 
        context,
        deviceType deviceListCallback);
    IDevice device = deviceList[0];
    */
    
    /* For a list of multiple device types. 
    List<DeviceType> deviceTypes = null; 
    deviceTypes.Add(DeviceType.MMS); 
    deviceTypes.Add(DeviceType.CMS);
    List<IDevice> deviceList = CoreAPI.getDeviceList( 
        context,
        deviceTypes, 
        deviceListCallback);
    IDevice device = deviceList[0];
    */
    
    /* Suscribe to events sent from the device.
    These would be but not limited to: card inserted, card removed, connection state...
    
    Set MainWindow to receive the events. */ 
    boolean return = device.unsubscribeAll(this);
    boolean return = device.subscribeAll(this);
    
    /* To handle events from some other class. 
    EventsVector eventsVector = new EventsVector() 
    boolean return = device.unsubscribeAll(eventsVector); 
    boolean return = device.subscribeAll(eventsVector);
    */
    
    // Assign parameters for the transaction.
    List<PaymentMethod> paymentMethod = new List<PaymentMethod>(); 
    paymentMethod.Add(PaymentMethod.MSR); 
    paymentMethod.Add(PaymentMethod.Contact); 
    paymentMethod.Add(PaymentMethod.Contactless);
    
    Transaction transaction = new Transaction(); 
    transaction.setAmount(“1.00”); 
    transaction.setCashBack(“0.00”); 
    transaction.setEMVOnly(true); 
    transaction.setPaymentMethods(paymentMethod); 
    transaction.setQuickChip(false);
    
    // Start transaction.
    boolean result = device.startTransaction(transaction);
    PersonalInfoEntry PersonalInfoEntryBuilder.GetPersonalInfoEntry( 
    DeviceType deviceType, 
    byte[] dataBytes);
    
    new PersonalInfoEntry( 
        byte[] data, 
        CaptureType dataType, 
        bool encrypted,
        ); 
    
    new PersonalInfoEntry( 
            byte[] data, 
            CaptureType dataType, 
            bool encrypted, 
            byte encryptionType, 
            byte[] ksn
            );
    // A class to handle events.
    public class EventsVector implements IEventSubscriber
    {
        public void OnEvent(EventType eventType, IData data)
        {
            switch (eventType)
            {
    case ConnectionState:
    // Parse for the ConnectionState ConnectionState value =
    ConnectionStateBuilder.GetValue(data.StringValue());
    
    break;
    case DeviceResponse:
    
    break;
    case DeviceExtendedResponse:
    
    break;
    case DeviceNotification:
    
    break;
    case CardData:
    
    break;
    case TransactionStatus:
    // Parse for the transaction status code and detail. 
    TransactionStatus status = 
    TransactionStatusBuilder.GetStatusCode(data.StringValue());
    
    string statusDetail = TransactionStatusBuilder.GetStatusDetail(data.StringValue());
    
    break;
    case DisplayMessage:
    
    String message;
    // Get the message. if (data != null)
    {
    message = System.Text.Encoding.UTF8.GetString(data);
    }
    break;
    case InputRequest:
    
    break;
    case AuthorizationRequest:
    
    // Forward ARQC to processor.
    /* data[0..1] – ARQC length
    data[2..n] – remainder contains the ARQC TLV object
    */
    
    IData processorARPC = new 
    BaseData(sendForAuthorization(data.ByteArray()));
    
    // Send authorization to device when not in QuickChip mode. 
    if (transaction.QuickChip == false)
    {
    device.sendAuthorization(procesorARPC.ByteArray());
    }
    
    break;
    case TransactionResult
    
    /* data[0] – Signature Required
        data[1..2] – Batch Data length
        data[3..n] – remainder contains the Batch Data TLV object
    */
    
    // Parse the TLV from data[].
    .
    // Abstract Approval status from TLV tag “DFDF1A”.
    .
    // Abstract Signature Required status from TLV tag data[0].
    .
    
    break;
    case PINBlock:
    
    break;
    case Signature:
    
    break;
    // Establish a device from CoreAPI.
    List<IDevice> deviceList = CoreAPI.getDeviceList(); IDevice device = deviceList[0];
    
    // Establish a deviceControl from device.
    IDeviceControl deviceControl = device.getDeviceControl();
    
    // Open the device, then use the IDeviceControl functions. deviceControl.open();
    
    . . .
    
    // Close the device. deviceControl.close();
    // Establish a device from CoreAPI.
    List<IDevice> deviceList = CoreAPI.getDeviceList(); 
    IDevice device = deviceList[0];
    
    // Establish a ConnectionInfo from device.
    ConnectionInfo connectionInfo = device.getConnectionInfo();
    
    // Retrieve address, connectionType, and deviceType. 
    String address = connectionInfo.getAddress();
    ConnectionType connectionType = connectionInfo.getConnectionType(); 
    DeviceType deviceType = connectionInfo.getDeviceType();
     // Establish a device from CoreAPI.
    List<IDevice> deviceList = CoreAPI.getDeviceList(); 
    IDevice device = deviceList[0];
    
    // Establish a IDeviceCapabilities from device. 
    IDeviceCapabilities capabilities = device.getCapabilities();
    
    
    // Retrieve device capabilities.
    boolean batteryBackedClock = capabilities.BatteryBackedClock(); 
    if (batteryBackedClock)
    {
    // Call IDeviceControl.setDateTime().
    }
    
    // Retrieve supported card payment methods.
    List<PaymentMethod> paymentMethods = capabilities.PaymentMethods();
    
    . . .
    // Establish a device from CoreAPI.
    List<IDevice> deviceList = CoreAPI.getDeviceList(); 
    IDevice device = deviceList[0];
    
    IDeviceConfiguration deviceConfiguration = 
        device.getDeviceConfiguration();
    
    /* To handle events from some other class. ConfigCallBacks 
    configCallBacks = new ConfigCallBacks();
    */
    
    // Update firmware.
    byte[] data = getDataFromURI(uri);
    int return = deviceConfiguration.updateFirmware(1, data, this);
    
    /* Get configuration.
        Device-Driven Fallback OID = 1.2.1.1.1.1
                contructed OID = E2 08 E1 06 E1 04 E1 02 C1 00
        Note: first digit of OID is ommited in the construction and instead is passed in the configType.
    */
    byte configType = 0x01;
    data = new byte[] {0xE2,0x08,0xE1,0x06,0xE1,0x04,0xE1,0x02,0xC1,0x00
    };
    byte[] response = devConfig.getConfigInfo(configType, data);
    
    
    /* Set configuation.
        Device-Driven Fallback OID is 1.2.1.1.1.1
            Disabled contructed OID = E2 09 E1 07 E1 05 E1 03 C1 01 00
                Enabled contructed OID = E2 09 E1 07 E1 05 E1 03 C1 01 01
        Note: first digit of OID is ommited in the construction and instead 
    is passed in the configType.
    
    */
    data = new byte[]
    {0xE2,0x09,0xE1,0x07,0xE1,0x05,0xE1,0x03,0xC1,0x01,0x00 };
    result = devConfig.getConfigInfo(configType, data);
    // A class to handle configuration callback events.
    public class ConfigCallbacks implements IConfigurationCallback
    {
    
        public void OnProgress(int progress)
        {
            /* Handle progress.
                Progress is complete when progress = 100 */
        }
    public void OnResult(StatusCode status, byte[] data)
    {
        /* Handle result.
            A configuration process is complete when 
            status = StatusCode.Success */
    }
    public IResult OnCalculateMAC(byte macType, byte[] data)
    {
        IResult result = new Result(StatusCode.UNAVAILABLE); 
        byte[] macBytes = null;
        
        DeviceType deviceType =
            device.getConnection Info().getDeviceType();
    
        switch (deviceType)
        {
            case DeviceType.MMS:
                macBytes = getDynaFlexMAC(macType, data); 
                break;
        }
    
        if (macBytes != null)
        {
            result = new Result(StatusCode.SUCCESS); 
            result.Data = new BaseData(macBytes);
        }
    
        return result;
        }
    
    }

    This enum refers to the type of customer information to capture.

    Enum
    Description

    Unavailable

    Capture unavailable

    PhoneNumber

    Capture the phone number

    SocialSecurityNumber

    This function allows the host to get an IDeviceConfiguration to configure the device.

    Return Value: Returns IDeviceConfiguration.

    This function retrieves the device control interface to the device.

    Return Value: Returns IDeviceControl

    This function returns an information class of the device.

    Return Value: Returns DeviceInfo.

    This function returns the name of the device assigned from createDevice().

    String IDevice.Name();

    Return Value: Returns the name of the device.

    This function prompts the user to present their card and enter a PIN. A card is presented so that the device can retrieve the PAN, which is used for Format blocks requiring a PAN. The encrypted PIN block (EPB) will be returned in the event OnEvent. The data byte array may be passed to builder function PANDataBuilder.GetPANData();

    For DynaFlex devices, this function starts a PIN session on the first call and shall be called again to send the PIN status to the device for completing the PIN session.

    Parameter
    Type
    Description

    Timeout

    byte

    Wait time in seconds.

    PaymentMethods

    List of PaymentMethod

    Parameter
    Type
    Description

    Timeout

    byte

    Wait time in seconds.

    PINMode

    byte

    Return Value: Returns true if successful. Otherwise, returns false.

    This function prompts the user to enter a PIN. The host must supply the PAN if the Format block selected requires a PAN. The encrypted PIN block (EPB) will be returned in the event OnEvent. The data byte array may be passed to builder function PINDataBuilder.GetPINData();

    For DynaFlex devices, this function starts a PIN session on the first call and shall be called again to send the PIN status to the device for completing the PIN session.

    Parameter
    Type
    Description

    Timeout

    byte

    Wait time in seconds.

    PINMode

    byte

    Return Value: Returns true if successful. Otherwise, returns false.

    This function prompts the user to enter a signature. The response data will be returned in the event OnEvent.

    Return Value: Returns true of successful. Otherwise, returns false.

    This function sends the Authorization Response Code (ARPC) blob to the device. The response data will be returned in the event OnEvent. See EMV Transaction Flow for how to process an EMV transaction.

    Parameter
    Description

    data

    Contains ARPC blob.

    Return Value: Returns true if successful. Otherwise, returns false.

    This function sends a command to a NFC Mifare Classic Tag type 2. The NFC tag must first be activated by calling startTransaction() with NFC enabled.

    Parameter
    Description

    data

    Command to send to the NFC tag. For details of the command see NFC Classic commands table below or D998200383 DynaFlex Family Programmer’s Manual (COMMANDS) section NFC/Mifare Pass Through Commands

    lastCommand

    Determines if this is the last NFC command to complete the operation. true = This is the last command. Device will provide a single beep after receiving a successful response from the NFC tag. To send subsequent commands, the NFC tag must be activated by calling startTransaction() with NFC enabled. false = Expect more commands (Default). Either set to true or false, if the NFC tag command fails, device will provide a double beep.

    encrypt

    Return Value: Returns true if successful. Otherwise, returns false.

    Command
    Length
    Field Value

    Mifare Read

    11

    Byte 0 – 0x30 – Read Command Byte 1 – Sector Number to Read Byte 2 – Start Block Number Byte 3 – End Block Number Byte 4 – Key Type, 0 = A, 1 = B Byte 5 to 10 = 6 Byte Key

    Mifare Write

    var

    Tag
    Len
    Value / Description

    81

    var

    Tag Response Code Byte 0 = 0x00 = Success Byte 0 = 0x01 = I/O Failed Byte 0 = 0x02 Authentication Failed Byte 1 = 0x01 = Block that Failed (optional)

    82

    var

    If unencrypted:

    Tag
    Len
    Value / Description

    FC

    var

    NFC Data Container

    /DF7A

    var

    If encrypted:

    Tag
    Len
    Value / Description

    /DFDF59

    var

    Encrypted Data Primitive to be decrypted.

    /DFDF50

    var

    Example Unencrypted Payload

    Example Encrypted Payload for Fast Read

    This function sends a command to an NFC Mifare DESFire Tag Type 4. The NFC tag must first be activated by calling startTransaction() with NFC enabled.

    Parameter
    Description

    data

    Command to send to the NFC tag. See DESFire Data Sheet (MF2DLHX0). Should follow ISO 7816-4 APDU format. For details of the command see D998200383 DynaFlex Family Programmer’s Manual (COMMANDS) section NFC/Mifare Pass Through Commands_

    lastCommand

    Determines if this is the last NFC command to complete the operation. true = This is the last command. Device will provide a single beep after receiving a successful response from the NFC tag. To send subsequent commands, the NFC tag must be activated by calling startTransaction() with NFC enabled. false = Expect more commands (Default). Either set to true or false, if the NFC tag command fails, device will provide a double beep.

    encrypt

    Return Value: Returns true if successful. Otherwise, returns false.

    Tag
    Len
    Value / Description

    81

    02

    Tag Response (SW1 SW2). See DESFire Data Sheet (MF2DLHX0). Should follow ISO 7816-4 APDU format.

    Tag
    Len
    Value / Description

    FC

    var

    NFC Data Container

    /DF7A

    var

    Tag
    Len
    Value / Description

    /DFDF59

    var

    Encrypted Data Primitive to be decrypted.

    /DFDF50

    var

    This function send a user selection to the device.

    Parameter
    Description

    Byte 0

    Status of User Selection: 0x00 = User Selection Request completed, see Selection Result 0x01 = User Selection Request aborted, cancelled by user 0x02 = User Selection Request aborted, timeout

    Byte 1

    The menu item selected by the user. This is a single byte zero based binary value.

    Return Value: Returns true if successful. Otherwise, returns false.

    This function send a user selection to the device.

    Parameter
    Description

    Byte 0

    Status of User Selection: 0x00 = User Selection Request completed, see Selection Result 0x01 = User Selection Request aborted, cancelled by user 0x02 = User Selection Request aborted, timeout

    Byte 1

    The menu item selected by the user. This is a single byte zero based binary value.

    Return Value: Returns true if successful. Otherwise, returns false.

    This function starts a transaction. This function will automatically handle the opening and closing of a device. The transaction will be processed through multiple calls to the event OnEvent. See EMV Transaction Flow for how to process an EMV transaction.

    Parameter
    Description

    transaction

    An interface that holds the parameters for the transaction.

    Return Value: Returns true if the transaction started successfully. Otherwise, returns false.

    This function allows the host to be notified of all events sent by the device.

    Parameter
    Description

    eventCallback

    Name of a class or structure that implements the IEventSubscriber Delegate interface event.

    Return Value: Returns true if successful.

    This function allows the host to no longer receive any events sent by the device.

    Parameter
    Description

    eventCallback

    Name of a class or structure that implements the interface event.

    Return Value: Returns true if successful.

    boolean IDevice.cancelTransaction();
    IDeviceCapabilities IDevice.getCapabilities();
    ConnectionInfo IDevice.getConnectionInfo();
    ConnectionState IDevice.getConnectionState();

    cancelTransaction

    getCapabilities

    getConnectionInfo

    getConnectionState

    IDeviceConfiguration IDevice.getDeviceConfiguration();
    IDeviceControl IDevice.getDeviceControl();
    DeviceInfo IDevice.getDeviceInfo();
    boolean IDevice.requestPAN(PANRequest panRequest, PINRequest pinRequest);
    boolean IDevice.requestPIN(PINRequest pinRequest);
    boolean IDevice.requestSignature();
    boolean IDevice.sendAuthorization(IData data);
    boolean IDevice.sendClasicNFCCommand( 
        IData data, 
        boolean lastCommand, 
        boolean encrypt);
    81	0100 (Tag Respons Code)
    82	82036D (Encryption Control)
        FC 820369 (NFC Data Container) DF7A 820364 (NFC Data)
            031391010F55047777772E6D616774656B2E636F6DFE00. . .
                    www.magtek.com
    81	0100 (Tag Response code)
    82	820389 (Encryption Control)
        DFDF59 820370 (Encrypted Data Primitive) 
            03679DC03B4CA607E3A7D2B52C8E9F1B5CD3D85E7368425. . .
        DFDF50 0A (Encrypted Data KSN) 
            FFFF9876543210200047
        DFDF51 01 (Encrypted Data Type) 
            80
    boolean IDevice.sendDESFireNFCCommand( 
        IData data, 
        boolean lastCommand, 
        boolean encrypt);
    81	0100 (Tag Respons Code)
    82	82036D (Encryption Control)
        FC 820369 (NFC Data Container) 
            DF7A 820364 (NFC Data)
                031391010F55047777772E6D616774656B2E636F6DFE00. . .
                        www.magtek.com
    81	0100 (Tag Response code)
    82	820389 (Encryption Control)
        DFDF59 820370 (Encrypted Data Primitive) 
            03679DC03B4CA607E3A7D2B52C8E9F1B5CD3D85E7368425. . .
        DFDF50 0A (Encrypted Data KSN) 
            FFFF9876543210200047
            DFDF51 01 (Encrypted Data Type) 
                    80
    boolean IDevice.sendPlusNFCCommand( 
        IData data, 
        boolean lastCommand, 
        boolean encrypt);
    boolean IDevice.sendSelection(IData data);
    boolean IDevice.startTransaction(ITransaction transaction);
    boolean IDevice.subscribeAll(IEventSubscriber eventCallback);
    boolean IDevice.unsubscribeAll(IEventSubscriber eventCallback);

    ConnectionState

    getDeviceConfiguration

    getDeviceControl

    getDeviceInfo

    Name

    requestPAN

    PANRequest

    PINRequest

    requestPIN

    PINRequest

    requestSignature

    sendAuthorization

    Parameter

    sendClassicNFCCommand

    Parameter

    NFC Classic Commands

    Response Data For NFC Classic Tag

    sendDESFireNFCCommand

    Parameter

    Response Data For NFC Mifare DESFire Tag Type 4

    ECP if unencrypted

    ECP if encrypted:

    Example Unencrypted Payload

    Example Encrypted Payload for Fast Read

    sendPlusNFCCommand

    Parameter for data

    sendSelection

    Parameter for data

    startTransaction

    Parameter

    subscribeAll

    Parameter

    unsubscribeAll

    Parameter

    Enumerations - F - V

    This enum refers to the status of a specific feature reported from DeviceFeature.

    Enum
    Description

    Capture the social security number

    ZipCode

    Capture the zip code

    EmployeeID

    Capture Employee ID number

    BirthDate

    Capture birth date in USA format

    List of the PaymentMethod enumeration. MSR = For magnetic stripe cards. Contact = For EMV chip cards. Contactless = For NFC contactless cards. ManualEntry = Manually entry, no card. When set, other payment methods must not be included. Barcode = For barcode. BarcodeEncrypted = For barcode with encrypted response. AppleVAS = For Apple VAS. GoogleVAS = For Google Wallet VAS. NFC = For NFC tag.

    PIN mode. Usage: 0x00 - Enter PIN 0x01 - Enter PIN Amount 0x02 - Reenter PIN Amount 0x03 - Reenter PIN 0x04 - Verify PIN For DynaFlex devices this is the User Interface Sequence: 0x01 - Present Card / Enter PIN (start session) 0x04 - Present Card / Enter PIN / Enter PIN Again (start session) On the second call to requestPAN(), send the PIN status: 0xFD - Cancel PIN Session (end session) 0xFE - PIN Entry Failed (end session) 0xFF - PIN Entry Successful (end session)

    MinLength

    byte

    Minimum length of accepted PIN (>= 4).

    MaxLength

    byte

    Maximum length of accepted PIN (=< 12).

    Tone

    byte

    Tone to play when prompting for the PIN. Usage: 0x00 - No sound 0x01 - One beep 0x02 - Two beeps

    Format

    byte

    ISO format for the PIN block.

    PAN

    String

    First 12 digits of the Primary Account Number. Leave blank if not required by the ISO format for the PIN block.

    PIN mode. Usage: 0x00 - Enter PIN 0x01 - Enter PIN Amount 0x02 - Reenter PIN Amount 0x03 - Reenter PIN 0x04 - Verify PIN For DynaFlex devices this is the User Interface Sequence: 0x00 - Enter PIN (start session) 0x02 - PIN Incorrect, Try Again (continue session) 0x03 - Enter PIN / Enter PIN Again (start session) 0x05 - Enter PIN Again (continue session) On the second call to requestPIN(), send the PIN status: 0xFD - Cancel PIN Session (end session) 0xFE - PIN Entry Failed (end session) 0xFF - PIN Entry Successful (end session)

    MinLength

    byte

    Minimum length of accepted PIN (> 4).

    MaxLength

    byte

    Maximum length of accepted PIN (< 12).

    Tone

    byte

    Tone to play when prompting for the PIN. Usage: 0x00 - No sound 0x01 - One beep 0x02 - Two beeps

    Format

    byte

    ISO format for the PIN block.

    PAN

    String

    First 12 digits of the Primary Account Number. Leave blank if not required by the ISO format for the PIN block.

    Determines if data returned is to be encrypted. true = Encrypt data false = Do not encrypt data (Default)

    Byte 0 – 0xA0 – Write Command Byte 1 – Sector Number to Write Byte 2 – Start Block Number Byte 3 – End Block Number Byte 4 – Key Type 0 = A, 1 = B Byte 5 to 10 = 6 Byte Key Byte 11 to x = Variable length Byte Data (16 bytes per block)

    Mifare Increment

    14

    Byte 0 – 0xC1 – Increment Command Byte 1 – Source Sector Number Byte 2 – Source Block number Byte 3 – Key Type 0 = A, 1 = B Byte 4 to 9 = 6 Byte Key Byte 10 to 13 = 4 Byte Operand

    Mifare Decrement

    14

    Byte 0 – 0xC0 – Decrement Command Byte 1 – Source Sector Number Byte 2 – Source Block number Byte 3 – Key Type 0 = A, 1 = B Byte 4 to 9 = 6 Byte Key Byte 10 to 13 = 4 Byte Operand

    Mifare Restore

    10

    Byte 0 – 0xC2 – Restore Command Byte 1 – Source Sector Number Byte 2 – Source Block number Byte 3 – Key Type 0 = A, 1 = B Byte 4 to 9 = 6 Byte Key

    Mifare Transfer

    10

    Byte 0 – 0xB0 – Write the value from the Transfer Buffer into destination block number Byte 1 – Destination Sector Number Byte 2 – Destination Block number Byte 3 – Key Type 0 = A, 1 = B Byte 4 to 9 = 6 Byte Key

    Encryption Control Payload

    NFC Data

    Encrypted Data KSN

    /DFDF51

    01

    Encrypted Data Encryption Type

    Determines if data returned is to be encrypted. true = Encrypt data false = Do not encrypt data (Default)

    · SW1 and SW2 of R-APDU

    If card is not able to respond: SW1 = 0x64, SW2 = 0x00

    Tag

    Len

    Value / Description

    ---

    ---

    ---

    821

    var

    Encryption Control Payload tag data.

    · Data of R-APDU**(see tables below)**

    NFC Data

    Encrypted Data KSN

    /DFDF51

    01

    Encrypted Data Encryption Type

    Success

    Failed

    Failed

    TimedOut

    Timed out

    Cancelled

    Cancelled

    Error

    Error

    HardwareNA

    Featured hardware not applicable for a status

    This enum refers to the type of image.

    Enum
    Description

    BITMAP

    BMP file

    This enum refers to the type of specific information to retrieve from the device.

    Enum
    Description

    DeviceSerialNumber

    FirmwareVersion

    Firmware version of the device.

    DeviceCapabilities

    Enum
    Description

    ASCII

    Ascii data mode

    Binary

    Binary data mode

    Enum
    Description

    None

    No update for the operation.

    NFCMifareUltralight

    Mifare Ultralight

    Enum
    Description

    MifareClassic

    Mifare Classic

    MifareDESFire

    Mifare DESFire

    AppleWalletMobileDESFire

    This enum refers to the operation status of the device.

    Enum
    Description

    NoStatus

    No update for the operation.

    Started

    Device has started an operation.

    Warning

    This enum refers to which card type the device will perform a transaction.

    Enum
    Description

    MSR

    For magnetic stripe cards.

    Contact

    For EMV chip cards.

    Contactless

    This enum refers to the status of the transaction.

    Enum
    Description

    NoStatus

    Set before the start of a transaction and before a card is presented to the device.

    NoTransaction

    No transaction in progress.

    This enum refers to the type of user event reported by the device. These events relate to user interaction.

    Enum
    Description

    None

    No events yet to occur.

    ContactlessCardPresented

    Contactless card has been presented.

    This enum refers to the Apple VAS and Google Wallet VAS mode. This controls how the VAS data is returned in the transaction ARQC. For details on Apple VAS data structure returned in a transaction see D998200383 DynaFlex Family Programmer’s Manual (COMMANDS).

    Enum
    Description

    Single

    The device reads only VAS data from a tapped smartphone, or reads EMV payment data from a tapped card. When the device sends ARQC to conclude the transaction, it only includes either EMV payment data in container FC for cards, or includes VAS data in container FE for smartphones.

    Dual

    The device reads both VAS data and EMV payment data from a tapped smartphone, or reads EMV payment data from a tapped card. When device sends ARQC to the host to conclude the transaction, it includes EMV payment data in container FC and includes VAS data, if available, in container FE.

    VASOnly

    This enum refers to the Apple VAS protocol. For details on Apple VAS data structure returned in a transaction see D998200383 DynaFlex Family Programmer’s Manual (COMMANDS).

    Enum
    Description

    URL

    URL VAS protocol

    Full

    Full VAS protocol

    NoStatus

    No change in status

    FeatureStatus

    Success

    ImageType

    InfoType

    NFCDataMode

    NFCEvent

    NFCTransactionMode

    OperationStatus

    PaymentMethod

    TransactionStatus

    UserEvent

    VASMode

    VASProtocol

    Capabilities of the device delimited by a comma.

    Boot1Version

    Boot 1 firmware version of the device.

    Boot0Version

    Boot 0 firmware version of the device.

    FirmwareHash

    Firmware hash comprised of part numbers, versions, and timestamps.

    TamperStatus

    Tamper status of the device. 0x00 = Not Tampered 0x01 = Tampered

    OperationStatus

    Operation status of the device. 0x01 = Offline 0x02 = Online

    OfflineDetail

    Offline details of the device. Bit 0 = Tamper problem present Bit 1 = Master Key problem present Bit 2 = Keys and Certificates problem present Bit 3 = Real Time Clock problem present Bit 4 = Random Number Generator problem present Bit 5 = Cryptography Engine problem present Bit 6 = Magnetic Stripe Reader Hardware problem present Bit 7 = Reserved

    FirmwareVersionWLAN

    Firmware version for WLAN module of the device.

    FirmwareVersionBLE

    Firmware version for Bluetooth LE module of the device.

    BatteryLevel

    Battery level of the device.

    MifareClassic1K

    Mifare Classic 1K

    MifareClassic4K

    Mifare Classic 4K

    MifareDESFireLight

    Mifare DESFire Light

    MifareMini

    Mifare Mini

    MifarePlusEV1

    Mifare Plus EV1

    MifarePlusEV2

    Mifare Plus EV2

    MifarePlusSE

    Mifare Plus SE

    MifarePlusX

    Mifare Plus X

    MifareDESFireEV1

    Mifare DESFire EV1

    MifareDESFireEV2

    Mifare DESFire EV2

    MifareDESFireEV3

    Mifare DESFire EV3

    ISO14443TypeA

    ISO 14443 Type A

    ISO14443TypeB

    ISO 14443 Type B

    NFCCardTypeNotSupported

    NFC Card Type Not Supported

    mDL

    Mobile Driver’s License

    mDLDeviceEngagementSuccess

    mDL Device Engagement Success

    mDLDeviceEngagementFailed

    mDL Device Engagement Failed

    TagRemoved

    Tag removed

    Failed

    Command failed

    IOFailed

    IO failed

    AuthenticationFailed

    Authentication failed

    Apple Wallet mobile DESFire

    Mifare2GoMobileDESFire

    Mifare 2 Go Mobile DESFire

    Device has sent a warning about the operation.

    Failed

    Device has failed an operation.

    Done

    Device has completed an operation.

    For NFC contactless cards.

    ManualEntry

    For user to manually enter transaction data without any card access.

    Barcode

    For barcode.

    BarcodeEncrypted

    For encrypted barcode.

    AppleVAS

    For Apple VAS.

    NFC

    For NFC tag.

    GoogleVAS

    For Google Wallet Smart Tap VAS.

    CardSwiped

    A card was swiped into the device.

    CardInserted

    A card was inserted into the device.

    CardRemoved

    A card was removed from the device.

    CardDetected

    A card was detected by the device.

    CardCollision

    A card collision was detected by the device.

    TimedOut

    The transaction was not completed before a timeout period.

    HostCancelled

    The host software sent a cancel.

    TransactionCancelled

    The transaction was cancelled.

    TransactionInProgress

    The transaction is in progress.

    TransactionError

    There is an error during the transaction.

    TransactionApproved

    The transactions is approved.

    TransactionDeclined

    The transactions is declined.

    TransactionCompleted

    The transaction is completed.

    TransactionFailed

    The transaction failed.

    TransactionNotAccepted

    The transaction was not accepted by the device.

    SignatureCaptureRequested

    A signature capture is requested by the device.

    TechnicalFallback

    Due to technical reasons, the chip transaction cannot be completed by the reader.

    QuickChipDeferred

    Device has sent a “Z3” response code to the chip card.

    DataEntered

    Data has been entered on the device for a manual card entry transaction.

    TryAnotherInterface

    Due to removal of the chip card or error with contactless card, the transaction cannot be completed by the reader.

    BarcodeRead

    A barcode is read.

    VASError

    Apple VAS error occurred.

    TransactionStartedFromDevice

    The transaction has started by user interaction with the device.

    TransactionStartedFromDeviceQuickChip

    The Quick Chip transaction has started by user interaction with the device.

    TransactionCancelledFromDevice

    The transaction was cancelled from device.

    ContactlessCardRemoved

    Contactless card has been removed.

    CardSeated

    Card is seated into the chip station.

    CardUnseated

    Card was removed from the chip station.

    CardSwiped

    Magnetic stripe card was swiped.

    TouchPresented

    Touch screen sensor press detected.

    TouchRemoved

    Touch screen sensor release detected.

    BarcodeRead

    Barcode detected.

    NFCMifareUltralightPresented

    Mifare Ultralight presented.

    MifareClassic1KPresented

    Mifare Classic 1K presented.

    MifareClassic4KPresented

    Mifare Classic 4K presented.

    MifareDESFireLightPresented

    Mifare DESFire Light presented.

    MifareMiniPresented

    Mifare Mini Presented.

    MifarePlusEV1Presented

    Mifare Plus EV1 presented.

    MifarePlusEV2Presented

    Mifare Plus EV2 presented.

    MifarePlusSEPresented

    Mifare Plus SE presented.

    MifarePlusXPresented

    Mifare Plus X presented.

    MifareDESFireEV1Presented

    Mifare DESFire EV1 presented.

    MifareDESFireEV2Presented

    Mifare DESFire EV2 presented.

    MifareDESFireEV3Presented

    Mifare DESFire EV3 presented.

    mDLPresented

    Mobile Driver’s License presented.

    NFCMifareUltralightRemoved

    Mifare Ultralight removed.

    MifareClassic1KRemoved

    Mifare Classic 1K removed.

    MifareClassic4KRemoved

    Mifare Classic 4K removed.

    MifareDESFireLightRemoved

    Mifare DESFire Light removed.

    MifareMiniRemoved

    Mifare Mini removed.

    MifarePlusEV1Removed

    Mifare Plus EV1 removed.

    MifarePlusEV2Removed

    Mifare Plus EV2 removed.

    MifarePlusSERemoved

    Mifare Plus SE removed.

    MifarePlusXRemoved

    Mifare Plus X removed.

    MifareDESFireEV1Removed

    Mifare DESFire EV1 removed.

    MifareDESFireEV2Removed

    Mifare DESFire EV2 removed.

    MifareDESFireEV3Removed

    Mifare DESFire EV3 removed.

    mDLRemoved

    Mobile Driver’s License removed.

    The device reads only VAS data from a tapped smartphone, and does not read data from a tapped card. If the tapped smartphone does not support VAS, the device does not detect or read from the smartphone. When the device send ARQC to conclude the transaction, it includes VAS data in container FE and does not include EMV payment data in container FC.

    PaymentOnly

    The device operates the same as EMV mode. It reads only EMV payment data from a tapped smartphone or a tapped card. When the device sends ARQC to conclude the transaction, it includes EMV payment data in container FC and does not include VAS data in container FE.

    ECP2

    The host can configure the ECP2 frame. See Apple ECP2.0 specification.

    IDeviceControl

    Create an instance of the IDeviceControl using IDevice.getDeviceControl(). Then use the function calls described in this chapter.

    Generally, these functions will run in one of two modes:

    • Asynchronous functions return data in the event handlers in section

    • Synchronous functions return data in the return value. If the data is not available immediately, the call will block until a wait time has elapsed.

    close

    This function closes the connection to the device.

    boolean IDeviceControl.close();

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function resets the device. This is equivalent to a power reset. After the reset, connection to the device will need to be re-established.

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function displays a message on the device’s screen.

    Parameter

    Description

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function clears session data and returns the device to an idle state.

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function sends a request for user input to the device. The response data will be returned in the event

    OnEvent.

    Parameter

    Description

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function opens a connection to the device.

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function instructs the device to play a tone.

    Parameter

    Description

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function sends a command to the device. The response will be passed to the event OnEvent.

    Parameter

    Description

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function sends an extended command to the device. The response will be passed to the event

    OnEvent

    Parameter

    Description

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function sends a raw APDU command from the host application to the NFC target while the device is operating in NFC Pass-Through mode. For NFC Type A or Type B using ISO 14443-4 Protocol.

    Used for applications that require direct APDU-level communication, such as mDL, secure element transactions, or custom NFC protocols.

    Parameter

    Description

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function sends a synchronous command to the device. The response from the device will be returned in IResult.

    Parameter

    Description

    Return Value:

    Returns IResult.

    This function sets the date and time for the device.

    Parameter

    Description

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function send a command to lock or unlock the card latch. The host can choose to lock the card during EMV transactions to limit the possibility of the cardholder prematurely removing the card. The lock can also be enabled while the card is out of the system to block cardholders from inserting a card.

    Parameter

    Description
    • false – unlock the latch in the device.

    • true – lock the latch in the device.

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function controls the status of the device’s LED indicators (Light Emitting Diode) to provide visual feedback NFC operation states. Applicable after entering NFC Pass-Through mode. The status is reset after exiting NFC Pass-Through mode.

    Parameter

    Description

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function commands the device to enter NFC Pass-Through Mode. This enables the host application to directly exchange APDU commands and responses with an NFC card or mobile device.

    Parameter

    Description

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function configures the NFC reader polling behavior used to detect nearby NFC targets such as cards, mobile devices, or mDL wallets. Applicable after entering the Pass-Through mode.

    Parameter

    Description

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function sends a command to show a barcode on the device’s display.

    Parameter

    Description
    Parameter
    Type
    Description

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function sends a command to immediately show an image on the device’s display.

    Parameter

    Description

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function sends a command to immediately show an image on the device’s display.

    Parameter

    Description
    Member
    Type/ Format
    Description

    Images must be BMP format, 160KB or smaller with no compression, maximum 320px by 240px, with color depth 16 color, 256 color, 16-bit color, or 24-bit color. Images smaller than the maximum size are centered on the display. Note images at full screen size must be 16-bit color or lower to meet the size requirement.

    For details see D998200383 DynaFlex Family Programmer’s Manual (Commands).

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function displays custom User Interface (UI) pages on devices that support a screen. It holds parameters for all UI page options of Text Lines, Text Buttons, Amount Buttons, and Image. Only one UI page option may be in effect at one time based on the option parameter. See the other subset functions for invoking a specific UI page.

    When the UI page is active, the device waits for further action. The device notifies the host when a Button is pressed. Text Buttons and Functional Buttons report as the button number. Amount Buttons report the $ amount in BCD format. A press on a Text line does not produce a report.

    Parameter

    Description

    0x00 = Up to 5 lines of text + 1 functional button Middle.

    0x01 = Title + up to 6 text buttons + up to 3 functional buttons.

    0x02 = Title + up to 6 $Amount buttons + up to 3 functional buttons.

    0x03 = Title + custom image + 1 functional button Right.

    Parameter
    Description

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function shows the Amount UI page.

    Parameter

    Description

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function shows the Image UI page.

    Parameter

    Description

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function shows the Text buttons UI page.

    Parameter

    Description

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function shows the Text lines UI page.

    Parameter

    Description

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function sends a command to start the barcode reader.

    Parameter

    Description

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function sends a command to start card emulation.

    • Compliance: Conforms to ISO/IEC 14443 Type-A and NFC Forum Type 4 standards.

    • Passive Operation mode: The NFC reader must generate the field to activate the simulated card.

    • Read-Only: The emulated card is read-only and does not support writing.

    • Supported Data Type: Supports the URI (URL) data type.

    Parameter

    Description

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function sends a command to prompt a cardholder for customer information. Captured information is later returned in OnEvent() EventType.TouchscreenPersonalInfoEntry.

    Parameter

    Description

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function sends a command to stop the barcode reader. This is applicable only when the timeout value for startBarCodeReader() was set to 0x00.

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function sends a command to stop card emulation.

    Return Value:

    Returns true if successful. Otherwise, returns false.

    This function stops the Personal Info Entry process. If called during info entry, the process will be canceled immediately.

    Return Value:

    Returns true if successful. Otherwise, returns false.

    Classes - A - I

    These classes are equipped with helper classes named Builders. Builders can parse the raw data byte array of an OnEvent() into a format required by a builder’s class.

    For the complete documentation index, see . This page is also available as .

    These constructors initialize a BarCodeData object. Use BarCodeDataBuilder.GetBarCodeData with data from the BarCodeData event to return a BarcodeData.