Magtek ADYNAMO Скачать руководство пользователя страница 37

Appendix A - Code Examples 

aDynamo, uDynamo, Dynamag, DynaMAX, eDynamo, BulleT| Secure Card Reader Authenticator | Programmer’s Reference (Android) 

 

Page 37 of 42 (

D99875728-31

Appendix A

 

Code Examples 

A.1

 

Open Device 

 

if (! m_SCRA.isDeviceConnected())  

 

m_SCRA.openDevice(); 

A.2

 

Close Device 

 

if (m_SCRA != null) 

 

m_SCRA.closeDevice();  

A.3

 

Get Connection Status Of Device 

 

if (! m_SCRA.isDeviceConnected())  

 

A.4

 

Receiving Card Data From Device 

 

private Handler m_SCRAHandler =  

new Handler(new SCRAHandlerCallback()); 

 
private MTSCRA m_SCRA = new MTSCRA(m_SCRAHandler); 

 

private class SCRAHandlerCallback implements Callback  

 

public boolean handleMessage(Message msg) 

 

Switch (msg.what) 

 

 

 

Case MTSCRAEvent.CardDataReceived: 

 

 

 

OnCardDataReceived(); 

 

 

 

break; 

 

 

 

 

public void OnCardDataReceived()  

 

// Display raw card data 

 

CardData.Text = m_SCRA.getResponseData();  

 

Содержание ADYNAMO

Страница 1: ...I Phone 562 546 6400 I Technical Support 888 624 8350 www magtek com aDynamo uDynamo Dynamag DynaMAX eDynamo BulleT Secure Card Reader Authenticator Programmer s Reference Android June 2017 Manual Par...

Страница 2: ...gTek is a registered trademark of MagTek Inc Android is a registered trademark of Google Inc Bluetooth is a registered trademark of Bluetooth SIG Inc All other system names and product names are the p...

Страница 3: ...granted under this Agreement are automatically terminated COPYRIGHT The Software is copyrighted Licensee may not copy the Software except for archival purposes or to load for execution purposes All ot...

Страница 4: ...of California and shall inure to the benefit of MagTek Incorporated its successors or assigns ACKNOWLEDGMENT LICENSEE ACKNOWLEDGES THAT HE HAS READ THIS AGREEMENT UNDERSTANDS ALL OF ITS TERMS CONDITI...

Страница 5: ...nRetry 10 3 3 setAddress 11 3 4 setDeviceConfiguration 11 3 5 openDevice 11 3 6 closeDevice 12 3 7 isDeviceConnected 12 3 8 isDeviceEMV 12 3 9 getMaskedTracks 12 3 10 getTrack1 13 3 11 getTrack2 13 3...

Страница 6: ...49 getTagValue 24 3 50 getTLVVersion 24 3 51 getTrackDecodeStatus 24 3 52 getSDKVersion 24 3 53 sendCommandToDevice 25 3 54 startTransaction EMV Device Only 25 3 55 setUserSelectionResult EMV Device O...

Страница 7: ...V Device Only 34 5 11 OnDeviceExtendedResponse EMV Device Only 35 6 Commands 36 6 1 Discovery 36 Appendix A Code Examples 37 A 1 Open Device 37 A 2 Close Device 37 A 3 Get Connection Status Of Device...

Страница 8: ...1 2 Nomenclature The general terms device and host are used in different often incompatible ways in a multitude of specifications and contexts For example host may have different meanings in the conte...

Страница 9: ...the uses features uses permissions and services as specified in the table below in its AndroidManifest xml file For examples see the AndroidManifest xml included with the MagTek SCRA Demo project Conn...

Страница 10: ...llowing table shows the connection types supported by the various SCRA devices Connection Type SCRA Device Note Audio aDynamo uDynamo BLE DynaMAX Supported for Adroid 4 4 2 to 5 1 1 BLEEMV eDynamo Sup...

Страница 11: ...arameter Description deviceAddress String value of the address Return Value None 3 4 setDeviceConfiguration This method sets the configuration parameters for the device public void setDeviceConfigurat...

Страница 12: ...corresponds to the track number Masked Track Data located in positions greater than indicated in the Masked Track Data Length field are undefined and should be ignored The Masked Track Data is decode...

Страница 13: ...ng getTrack2 Parameters None Return Value Return stored track2 data string 3 12 getTrack3 Get stored track3 data This field contains the encrypted track data for track 3 public string getTrack3 Parame...

Страница 14: ...PAN are set to zero one of them will be set such that last digit of the PAN calculates an accurate Mod 10 check of the rest of the PAN as transmitted If the Mod 10 correction is not specified all of t...

Страница 15: ...yte Binary field contains the MagnePrint data Only the number of bytes specified in the MagnePrint data length field are valid The least significant bit of the first byte of data in this field corresp...

Страница 16: ...evice serial number This 16 byte ASCII field contains the device serial number The device serial number is a NUL zero terminated string So the maximum length of the device serial number not including...

Страница 17: ...t 21 bits If no keys are loaded all bytes will have the value 0x00 public string getKSN Parameters None Return Value Return stored key serial number 3 21 getDeviceName Get device model name public str...

Страница 18: ...None Return Value String representing MagnePrint Encryption capabilities 0 No Encryption 1 Same as MagStripe 8122 other values TBD If absent default value is 1 3 27 getCapMagneSafe20Encryption Retriev...

Страница 19: ...None Return Value String representing Track capabilities Bit 0 1 Track 1 supported Bit 1 1 Track 2 supported Bit 2 1 Track 3 supported All other bits 0 3 31 getCardDataCRC Retrieves CRC from card data...

Страница 20: ...card last 4 digits 3 35 getCardName Retrieves card name from card data public string getCardName Parameters None Return Value String representing card name 3 36 getCardPAN Retrieves PAN from card data...

Страница 21: ...VA encode Track 3 is AAMVA format Tracks 1 and 2 are ISO ABA if correctly decoded 2 Reserved 3 Blank The card is blank Only occurs if all tracks decode without error and without data 4 Other The card...

Страница 22: ...Last 4 Digits of PAN 8283 Send Card Expiration 8284 Send Card Service Code 8285 Send Card PAN Length Return Value String representing device configuration 3 44 getEncryptionStatus Retrieves encryptio...

Страница 23: ...iant Bidirectional Bits 12 15 Unassigned always set to Zero 3 45 getFirmware Retrieves firmware version public string getFirmware Parameters None Return Value String representing firmware version 3 46...

Страница 24: ...a one byte value which indicates the status of decoding track 1 Bit position zero indicates if there was an error decoding track 1 if the bit is set to one If it is zero then no error occurred If a tr...

Страница 25: ...on timeLimit Specifies the maximum time in seconds allowed to complete the total transaction This includes time for the user to insert the card choose a language choose an application and online proce...

Страница 26: ...6 bytes in hex string For example 000000001000 means 10 00 dollars currencyCode Transaction Currency Code EMV Tag 5F2A format n4 2 bytes Sample Valid values 0x0840 US Dollar 0x0978 Euro 0x0826 UK Pou...

Страница 27: ...nse EMV Device Only This function informs EMV device to process transaction decision from acquirer public int setAcquirerResponse byte response Parameters Parameter Description response The first two...

Страница 28: ...Page 28 of 42 D99875728 31 Parameters Parameter Description command Hexadecimal string of the byte array for the extended command The first two bytes represent the value of the extended command The ne...

Страница 29: ...iceInfo SCRAConfigurationDeviceInfo value containing information pertaining to the device address String value of the address for connection to the server timeout Integer value of the timeout in secon...

Страница 30: ...31 public String getConfigurationParams String model ProcessMessageResponse messageReponse throws MTSCRAException Parameters Parameter Description model String value containing the device model messa...

Страница 31: ...ged Parameter Description obj MTCardDataState value indicating the state of the card data DataNotReady DataReady DataError 5 3 OnDataReceived This message occurs when card information is received from...

Страница 32: ...on Progress Indicator This one byte field indicates the current processing stage for the transaction 0x00 No transaction in progress 0x01 waiting for user to insert card 0x02 powering up the card 0x03...

Страница 33: ...Result command with transaction will be aborted and an appropriate Transaction Status will be available Value 0 is not allowed 2 Menu Items This field is variable length and is a collection of C style...

Страница 34: ...array containing the data received from the device See table below for descriptions of the data Offset Field Name Value 0 Signature Required This field indicates whether a card holder signature is re...

Страница 35: ...unt Authorized field 0x0388 Invalid Transaction Type field 0x0389 Invalid Cash Back field 0x038A Invalid Transaction Currency Code field 0x038B Invalid Selection Status 0x038C Invalid Selection Result...

Страница 36: ...created by MagTek Use getDeviceSerialMagTek method to retrieve data Device Firmware Part Number Device firmware part number Use getFirmware method to retrieve data Device Model Name Device model name...

Страница 37: ...A closeDevice A 3 Get Connection Status Of Device if m_SCRA isDeviceConnected A 4 Receiving Card Data From Device private Handler m_SCRAHandler new Handler new SCRAHandlerCallback private MTSCRA m_SCR...

Страница 38: ...Card Reader Authenticator Programmer s Reference Android Page 38 of 42 D99875728 31 Display last 4 digits of the card CardLast4 Text m_SCRA getCardLast4 A 5 Send Command To Device if mSCRA isDeviceCo...

Страница 39: ...1F TLV T1 DD len val DF36 Encrypted Tag 9F20 TLV T2 DD len val DF37 Encrypted Tag 9F61 TLV T2 CVC3 len val DF38 Encrypted Tag 9F62 TLV T1 PCVC3 len val DF39 Encrypted Tag DF812A TLV T1 DD len val DF3A...

Страница 40: ...electable formats Original and DynaPro It is a TLV object with the following contents Original format F9 len container for ARQC Response data DFDF25 IFD Serial Number len val FA len Container for gene...

Страница 41: ...sal Data if any Reversal Data tags defined in DFDF05 Note Sensitive Data cannot be defined in DFDF05 F7 len container for Merchant Data Merchant Data tags F8 len container tag for encrypted data DFDF5...

Страница 42: ...r len val FA len container for generic data F0 len Transaction Results F1 len container for Status Data Status Data tags F8 len container tag for encryption DFDF59 Encrypted Data Primative len Encrypt...

Отзывы: