Get Card Reader Information

This method retrieves information about the connected card reader.

error_outline
note

This method requires a valid connected card reader.

Do not use this method while the card reader is in the middle of another operation.

Code Samples

CWS

Request

method
string | required
getCardReaderInfo
 
requestId
string | required
Transaction Request ID
 
targetType
string | required
api
 
parameters
JSONObject | required
All relevant parameters for retrieving the card reader information.
 

Response

requestId
string
Transaction Request ID
As specified in the request.
statusDetails
string
Request Status
 
data
JSONObject
Object holding various responses.
 
cardReaderInfo
JSONObject
Object holding various properties and options of the current card reader.
 
completed
boolean
Request Result
Retrieve card reader infomation request result.

Example

Request
{
  "method" : "getCardReaderInfo",
  "requestId" : "1",
  "targetType" : "api",
  "parameters" : { }
}
Response
{
    "requestId": "1",
    "statusDetails": "REQUEST_ACCEPTED",
    "data": {
        "completed": true,
        "cardReaderInfo": {
            "entryModes": [
                "SWIPE",
                "MANUALLY_ENTERED",
                "MSD_PROXIMITY",
                "EMV_CONTACT"
            ],
            "options": [
                "GRATUITY",
                "SIGNATURE"
            ],
            "model": "iSC250",
            "name": "iSC250",
            "manufacturer": "INGNAR",
            "manufactureDate": "2014-11-28",
            "serialNumber": "2214332SC011454",
            "paymentAppName": "Retail Base",
            "paymentAppVersion": "1406",
            "securityModuleVersion": "0401",
            "sdkVersion": "4.0.18",
            "osVersion": "3806",
            "elavonConfigVersion": "ISC250_ELAVON_US_EMV_027",
            "countMsrSwipes": "0311",
            "countBadTrack1Reads": "00",
            "countBadTrack2Reads": "07",
            "countBadTrack3Reads": "00",
            "countSignatures": "0427",
            "countReboots": "0797",
            "emvCardReader": true
        }
    }
}

Java

You need to set up a delegate to implement ECLCardReaderGetAttributesForInitializedCardReaderListener and pass it to getAttributesForInitializedCardReader function of card reader protocol. The card reader data will be available in delegate's cardReaderGetAttributesForInitializedCardReaderSuccess call back.

ECLCardReaderInterface cardReaderInterface;

cardReaderInterface.getAttributesForInitializedCardReader(false, new ECLCardReaderGetAttributesForInitializedCardReaderListener()
{
    @Override
    public void cardReaderGetAttributesForInitializedCardReaderSuccess(
        ECLCardReaderInterface eclCardReaderInterface, ECLCardReaderAttributes cardReaderAttributes)
    {
        if (cardReaderAttributes != null)
        {
            displayMessage("Card Reader Info:");
            displayMessage("=================");
            displayCardReaderAttribute("Model: ", cardReaderAttributes.getModel());
            displayCardReaderAttribute("Name: ", cardReaderAttributes.getName());
            displayCardReaderAttribute("Manufacturer: ", cardReaderAttributes.getManufacturer());
            displayCardReaderAttribute("Manufacture Date: ", cardReaderAttributes.getManufactureDate());
            displayCardReaderAttribute("Serial Number: ", cardReaderAttributes.getSerialNumber());
            displayCardReaderAttribute("Reader SDK Version: ", cardReaderAttributes.getSdkVersion());
            displayCardReaderAttribute("Elavon Config Version: ", cardReaderAttributes.getElavonConfigVersion());
            displayCardReaderAttribute("PCI Version: ", cardReaderAttributes.getPciVersion());
        }
        else
        {
            displayMessage("Failed to retrieve card reader info");
        }
    }

    @Override
    public void cardReaderGetAttributesForInitializedCardReaderError(
        ECLCardReaderInterface eclCardReaderInterface, ECCError eccError)
    {
        displayMessage("Failed to retrieve card reader info; " + eccError);
    }
});

ECLCardReaderAttributes is a Java bean with the following public getters:
public class ECLCardReaderAttributes
{
    public EnumSet<ECLCardEntryType> getEntryModes();
    public EnumSet<ECLCardReaderOption> getOptions();
    public String getModel();
    public String getName();
    public String getManufacturer();
    public String getSerialNumber();
    public String getSdkVersion();
    public String getOsVersion();
    public String getManufactureDate();
    public String getPaymentAppName();;
    public String getPaymentAppVersion();
    public String getSecurityModuleVersion();
    public String getElavonConfigVersion();
    public String getCountMsrSwipes();
    public String getCountBadTrack1Reads();
    public String getCountBadTrack2Reads();
    public String getCountBadTrack3Reads();
    public String getCountSignatures();
    public String getCountReboots();
    public boolean isEmvCardReader();
    public boolean isCapableOfPairing();
}

Objective-C

You need to set up a delegate to implement ECLCardReaderAttributesForInitializedCardReaderDelegate and pass it to attributesForInitializedCardReader function of card reader protocol. The card reader data will be available in delegate's cardReaderAttributesForInitializedCardReaderSuccess callback.

[cardReader attributesForInitializedCardReader:delegate];

+ (void)cardReaderAttributesForInitializedCardReaderSuccess:(id<ECLCardReaderProtocol>)cardReader cardReaderAttributes:(ECLCardReaderAttributes *)cardReaderAttributes {
    if (cardReaderAttributes != nil) {
        //card reader data exists
    } else {
        //no card reader data
    }
}

+ (void)cardReaderAttributesForInitializedCardReaderError:(id<ECLCardReaderProtocol>)cardReader error:(NSError *)error {
    //error encountered during operation
}

// ECLCardReaderAttributes has the following properties
@interface ECLCardReaderAttributes : NSObject

@property (readonly)ECLCardEntryType entryModes;
@property (readonly)ECLCardReaderOption options;
@property (readonly)NSString *model;
@property (readonly)NSString *name;
@property (readonly)NSString *manufacturer;
@property (readonly)NSDate *manufactureDate;
@property (readonly)NSString *serialNumber;
@property (readonly)NSString *sdkVersion;
@property (readonly)NSString *osVersion;
@property (readonly)NSString *paymentAppName;
@property (readonly)NSString *paymentAppVersion;
@property (readonly)NSString *securityModuleVersion;
@property (readonly)NSString *pciVersion;
@property (readonly)NSString *configVersion;
@property (readonly)NSNumber *countMsrSwipes;
@property (readonly)NSNumber *countBadTrack1Reads;
@property (readonly)NSNumber *countBadTrack2Reads;
@property (readonly)NSNumber *countBadTrack3Reads;
@property (readonly)NSNumber *countSignatures;
@property (readonly)NSNumber *countReboots;
+ (BOOL)isEmvCardReader;

C#


/* Asynchronous */

         m_CWS.StartCardReaderInfo(MyNotifyCWSEvent, MyCardReaderInfoComplete);

/* Synchronous */
         CardReaderInfoResults crir = m_CWS.CardReaderInfo(null);
         MyCardReaderInfoComplete(crir);

/* Handle results */
        public void MyCardReaderInfoComplete(CardReaderInfoResults crir)
        {
            Log("----------- MyCardReaderInfo Complete ------------");
            CardReaderInfo info = crir.CardReaderInfo;
            if (null != info)
            {
                Log(String.Format("Name: {0}", info.name));
                Log(String.Format("Model: {0}", info.model));
                ....