Initializing a Transaction

Tomcat

Professional
Messages
2,689
Reaction score
963
Points
113
After selecting the application, the terminal must prepare for the current operation. To do this, he must reset the values of the parameters used to display the results of various procedures performed by the terminal during the processing of the current transaction. Such terminal parameters, in particular, include Terminal Verification Results objects (TVR, Tag '95', 5 bytes) and Transaction Status Information (TSI, Tag '9B', 2 bytes). (For other data objects - CVM Results and Issuer Script Results - see paragraphs 4.7 and 4.12.) Resetting parameters means that the values of all bits of the data fields of the TVR, TSI, CVM Results and Issuer Script Results objects are set to 0.

The TVR object is 5 bytes in size and records the results of checks performed by the terminal during the processing of the current transaction. The bytes of the data field of the TVR object display information on the results of the following types of checks:
  • byte 1 - card authentication results;
  • byte 2 - results of checks of restrictions on the use of the card (Processing Restrictions);
  • byte 3 - results of cardholder Verification;
  • byte 4 - results of Terminal Risk Management execution by the terminal;
  • byte 5 - results of the issuer authentication procedure and Script Processing.

A detailed view of the TVR data object is presented in table. 4.1-4.5.

Tab. 4.1. Byte 1 TVR (leftmost)

B8B71 bb | b5B4B3 | B2NSMeaning
1Offline data authentication was not performed
1Offline SDA failed
1ICC data missing
(some data related to the chip is missing)
1Card appears on terminal exception file
1Offline DDA failed
1CDA / AC Generation failed
0Reserved for use
0Reserved for use

Tab. 4.2. Byte 2 TVR

B8B7 | b6 | b5B41 b3B2NSMeaning
1ICC and terminal have different application versions
1Expired application
1Application not yet effective
(the application has not started yet)
1Requested service not allowed for card product
1New card
0Reserved for use
0Reserved for use
0Reserved for use

Tab. 4.3. Byte 3 TVR

45.png

Meaning

Cardholder verification was not successful (the cardholder verification procedure was unsuccessful) Unrecognized CVM (the terminal does not understand the verification method)

PIN Try Limit exceeded

PIN entry required and PIN pad not present or not working

PIN entry required, PIN pad present, but PIN was not entered

The end of the table. 4.3

B8 | b? | B6 | b5 b4bsB2NSMeaning
1Online PIN entered
0Reserved for use
0Reserved for use

Tab. 4.4. Byte 4 TVR

B8B7 | b6 | b5B4 b3B2 bMeaning
1Transaction exceeds floor limit
1Lower Consecutive Offline Limit exceeded
1Upper Consecutive Offline Limit exceeded
1Transaction selected randomly for online processing
1Merchant forced transaction online
0Reserved for use
0Reserved for use
0Reserved for use
Tab. 4.5. Byte 5 TVR (rightmost)
B8B7 | b6 b5B4 b3B2NSMeaning

Default TDOL used

46.png

Issuer Authentication was unsuccessful

Script Processing failed before final GENERATE AC (the script processing procedure failed before the 2nd GENERATE AC command)

Script Processing failed after final GENERATE AC (the script processing procedure failed after the 2nd GENERATE AC command)

Reserved for use

Reserved for use

Reserved for use

Reserved for use

The purpose and way of filling the bits of the TVR object will be discussed in the course of the description of the transaction processing procedures.

The TSI data object consists of two bytes. All bits of the second byte are reserved for future use, and the structure of the first byte is shown in Table. 4.6.

Tab. 4.6. Byte 1 TSI

B8

B7 | b6 | b5 | b4 | b3 | b2 | b

Meaning

47.png

Offline data authentication was performed

Cardholder verification was performed

Card risk management was performed

Issuer authentication was performed

Terminal risk management was performed

Issuer Script Processing was performed

Reserved for use

О Reserved for use

As you can see from the table. 4.6, the TSI data object records a list of the main procedures performed by the terminal and the card during transaction processing. The purpose of the bits and the method of filling TSI will be discussed in the course of the description of the transaction processing procedures.

After selecting the application and resetting its internal parameters, the terminal sends the GET PROCESSING OPTIONS command to the card. The main details of this command are presented in table. 4.7.

Tab. 4.7. GET PROCESSING OPTIONS command structure

PropsMeaning
CLA'80'h (a command invented specifically for EMV)
INS* A8'h
Pl'00'h
P2'00'h
LcCommand data field size
DataTag '83' | | Length | | Byte string containing data concatenation according to PDOL
Le'00'h

Chapter 4. PROCESSING TRANSACTIONS BY MICROPROCESSOR CARD 293

G

MasterCard ^? 9

As you can see from the table. 4.7, the data field of the GET PROCESSING OPTIONS command is a concatenation of the Value fields of the data objects listed in the PDOL if the PDOL list is contained in the FCI Template of the selected card application (in this case, the PDOL list is obtained by the terminal from the FCI Proprietary Template data object contained in the card response to SELECT command).

If the PDOL list is not in the FCI Proprietary Template of the selected application, then in the data field of the GET PROCESSING OPTIONS command, the value of the Length field of the data object with Tag '83' is 0, and the data field of this object is absent.

If the PDOL is contained in the FCI Proprietary Template of the selected application, then it consists of the Tag and Value fields of those data objects whose values the map application needs to determine the most efficient way to process the current transaction. Such data may include transaction size (Amount, Authorized, Tag '9F02'), transaction currency (Transaction Currency Code, Tag '5F2A'), terminal type (Terminal Type, Tag '9F35'), terminal functionality (Terminal Capabilities , Tag '9F33'), terminal country code (Terminal Country Code, Tag '9F1A'), merchant type (Merchant Category Code, Tag '9F15'), transaction type (Transaction Type, Tag '9C'), etc. ...

The most efficient way of processing a transaction in this case is determined by the card (more precisely, by the card issuer) by selecting the values of two Application Interchange Profile data elements (AIP, Tag '82', size 2 bytes) and Application File Locator (AFL, Tag 'corresponding to the data received from the terminal) 94 ', size up to 252 bytes).

For example, if the PDOL list contains the country code of the terminal, then the card can differentiate the processing of domestic and international

Tab. 4.8. First byte of AIP

B8B7B6B5B4bzB2NSMeaning
0Not used
1SDA supported
1DDA supported
1SUM supported
1Terminal Risk Management must be used
0/1Issuer authentication via 2nd GENERATE АС / External Authenticate
1CDA supported
0Not used

transactions, by offering the terminal, using the AFL object, references to various data objects that the terminal must use to process the transaction.

The Application Interchange Profile Data Element defines for the terminal the card's ability to process a transaction, as well as the card's requirement for the terminal for the terminal to perform risk management procedures. The structure of the first AIP byte is shown in Table. 4.8.

The second byte of the AIP is zero for contact cards (the values of all bits are reserved for future use; the eighth bit of this byte is sometimes used for contactless applications of some payment systems). The table shows that the AIP element defines:
  • authentication methods supported by the card;
  • the fact that the card supports the verification procedure of the cardholder;
  • card requirement on the need for the terminal to comply with the risk management procedure;
  • the way the card supports the issuer authentication procedure (via the second GENERATE AC command or the EXTERNAL AUTHENTICATE command).
Note that in the M / Chip 4 application the GENERATE AC command is used to authenticate the issuer (bit 3 of byte 1 AIP is 0), and in the VIS 1.4.x application the EXTERNAL AUTHENTICATE command is used (bit 3 of byte 1 AIP is 1).

The Application File Locator element defines a list of data that must be read by the terminal on the card in order to process a transaction. This data item consists of a set of links. Each link is a sequence of four bytes with the following assignment:
  • the first byte specifies the value of the SFI name of the AEF elementary file (the most significant five bits of the byte are equal to the SFI value) whose records are to be read by the terminal. All other bytes of the link specify parameters related to the elementary AEF file named SFI, identified by the first byte of the link;
  • the second byte is the binary representation of the number of the first record of the linear AEF file from which to start reading the records of the AEF file; this number cannot be equal to 0;
  • the third byte is a binary representation of the number of the last record (must be at least the number of the first record), up to which the records of the AEF file must be read sequentially;
  • the fourth byte is a binary representation of the number of records in the AEF file that are used for static card authentication (to form the Static Data to be Authenticated element, starting with the record number specified in the second byte of the descriptor). If there are no such entries in the AEF file in question, the fourth byte consists of eight zero bits.
If the card successfully processes the GET PROCESSING OPTIONS command, the card increments the Application Transaction Counter (Tag '9F39', 2 bytes) and initializes the card application to perform a new operation.

Based on the AIP and AFL data obtained from the card's response to the GET PROCESSING OPTIONS command, the terminal determines which commands should be sent to the card to process the transaction, as well as where (in which records of which card files) the data needed to perform the operation should be searched.
 
Top