Q: (DO) I need to convert the first two bytes in a CV rule to binary and match with the table above?
A: In the example tag 0x8E value you have:
- 2 amounts each 4 bytes length, 8 bytes in total.
- group of 4 Cardholder Verification (CV) Rules each 2 bytes, 8 bytes total CVM list length. Where in each 2 bytes rule:
- Byte 1 is "Cardholder Verification Method (CVM) Code" which is binary table of in your request. Example: HEX value needs to be converted to binary format. Where HEX 0x41 == binary b01000001. Then match bits to the table 39 with CVM Codes.
- Byte 2 is "Cardholder Verification Method (CVM) Condition Code". The table with descriptions presented in EMV specification.
Q: But why does the table above have empty cells?
A: Because there are two Amounts 4 bytes each (8 HEX characters) in front of Tag value. Then exactly CVM rules list.
Q: Also can someone explain in a simple pseudo code algorithm to parse this?
A: See example of parsing CVM List tag 0x8E value.
---
# Cheef's parser.
# Copyright (C) 2008-2017 Alexander Shevelev. https://iso8583.info/
# lib : "/lib/EMV/" - Integrated Circuit Card Specifications for Payment Systems
# tool : "TV"
# stat : 18 nodes, 4 lookup tables, 100.00% passed (4/4)
TV:#"8E0000000000000000410342031E031F02" # EMV, Cardholder Verification Method (CVM) List
- tag: "8E"
- val:#"0000000000000000410342031E031F02" # Cardholder Verification Method (CVM) List.
- AmountX: "00000000" # Amount X
- AmountY: "00000000" # Amount Y
- CVRs:#"34313033343230333145303331463032" # CVM List
- S1:#"4103" # Cardholder Verification Rule
- CVMCode: "41" # Cardholder Verification Method (CVM) Code
# _1______ - Apply succeeding CVR if CVM fails
# __000001 - ICC Plain PIN verification
- CVMCondition: "03" # Cardholder Verification Method (CVM) Condition Code // If terminal supports the CVM
- S2:#"4203" # Cardholder Verification Rule
- CVMCode: "42" # Cardholder Verification Method (CVM) Code
# _1______ - Apply succeeding CVR if CVM fails
# __000010 - Online Enciphered PIN verification
- CVMCondition: "03" # Cardholder Verification Method (CVM) Condition Code // If terminal supports the CVM
- S3:#"1E03" # Cardholder Verification Rule
- CVMCode: "1E" # Cardholder Verification Method (CVM) Code
# _0______ - Fail cardholder verification if CVM is unsuccessful
# __011110 - Signature (paper)
- CVMCondition: "03" # Cardholder Verification Method (CVM) Condition Code // If terminal supports the CVM
- S4:#"1F02" # Cardholder Verification Rule
- CVMCode: "1F" # Cardholder Verification Method (CVM) Code
# _0______ - Fail cardholder verification if CVM is unsuccessful
# __011111 - No CVM required
- CVMCondition: "02" # Cardholder Verification Method (CVM) Condition Code // If not cash or cashback