Exemplo n.º 1
0
def human(aip):
    """Returns a string that represent the human readable version of the ."""

    title = "Application Interchange Profile (tag: 0x82)"
    data = [[i] for i in util.unroll(aip)]
    col_header = ["Value"]
    row_header = [
        "RFU", "SDA supported", "DDA supported",
        "Cardholder verification is supported",
        "Terminal risk management is to be performed",
        "Issuer authentication is supported", "RFU", "CDA supported",
        "Reserved for us by the EMV Contactless Specifications"
    ] + ["RFU"] * 7

    return util.table(title, data, col_header, row_header)
Exemplo n.º 2
0
def human(aip):
    """Returns a string that represent the human readable version of the ."""

    title = "Application Interchange Profile (tag: 0x82)"
    data =[[i] for i in util.unroll(aip)]
    col_header = ["Value"]
    row_header = [
            "RFU",
            "SDA supported",
            "DDA supported",
            "Cardholder verification is supported",
            "Terminal risk management is to be performed",
            "Issuer authentication is supported",
            "RFU",
            "CDA supported",
            "Reserved for us by the EMV Contactless Specifications"
            ] + ["RFU"] * 7

    return util.table(title, data, col_header, row_header)
Exemplo n.º 3
0
def human(decline, online, default):
    """ Returns the human readable string for the given xIAC. """

    decline_col = util.unroll(decline)
    online_col = util.unroll(online)
    default_col = util.unroll(default)

    bit_per_bytes = 8
    nbr_bytes = len(default_col) / bit_per_bytes

    byte_col = bytelist(nbr_bytes)
    bit_col = bitlist(nbr_bytes)

    tmp = [byte_col, bit_col, decline_col, online_col, default_col]
    data = map(list, zip(*tmp))

    size = len(tmp[0])

    colums_header = ["byte", "bit", "dec", "onl", "def"]

    # Issuer Action Code row headers.
    rows_header_iac = [
        "Offline data authentication not performed",
        "SDA Failed",
        "ICC data missing",
        "Card appears on terminal exception file",
        "DDA failed",
        "CDA failed",
        "RFU",
        "RFU",
        "ICC and terminal diff app versions",
        "Expired application",
        "Application not yet effective",
        "Requested srvice not allowed ",
        "New card",
        "RFU",
        "RFU",
        "RFU",
        "Cardholder verification not successful",
        "Unrecognized CVM",
        "PIN Try Limit exceeded",
        "PIN required, pad not present/working",
        "PIN required, pad present, PIN not entered",
        "Online PIN entered",
        "RFU",
        "RFU",
        "Transaction exceeds floor limit",
        "Lower consecutive offline limit exceed",
        "Upper consecutive offline limit exceeded",
        "Transaction selected rand online processing",
        "Merchant forced transaction online",
        "RFU",
        "RFU",
        "RFU",
        "Default TDOL used",
        "Issuer authentication failed",
        "Script failed before final GENERATE AC",
        "Script failed after final GENERATE AC",
        "RFU",
        "RFU",
        "RFU",
        "RFU",
    ]

    # Card Issuer Action Code row headers (MasterCard specific).
    rows_header_ciac = [
        "RFU",
        "Unable to go online",
        "Offline PIN verif Not Performed",
        "Offline PIN Verification Failed",
        "PIN Try Limit exceeded",
        "International Transaction",
        "Domestic Transaction",
        "Terminal Wrongly Considers Off PIN OK",
        "Lower Consecutive Offiline Limit Exceeded",
        "Upper Consecutive Offiline Limit Exceeded",
        "Lower Cumulative Offiline Limit Exceeded",
        "Upper Cumulative Offiline Limit Exceeded",
        "Go Online On Next Transaction Was Set",
        "Issuer Authentication Failed",
        "Script Received",
        "Script Failed",
        "RFU",
        "RFU",
        "RFU",
        "RFU",
        "RFU",
        "RFU",
        "Match Found in Additional Check Table",
        "No Match Found In Additional Check Table",
    ]

    # Select the right title and rows_header list.
    if len(rows_header_iac) == size:
        title = "Issuer Action Code (Tag:9F0E,9F0F,9F0D)."
        rows = rows_header_iac
    elif len(rows_header_ciac) == size:
        title = "CARD Issuer Action Code (Tag:C3/CF,C5/CE,C4/CD)."
        rows = rows_header_ciac
        title
    else:
        rows = range(1, size + 1)

    return util.table(title, data, colums_header, rows)
Exemplo n.º 4
0
def human(decline, online, default):
    """ Returns the human readable string for the given xIAC. """

    decline_col = util.unroll(decline)
    online_col = util.unroll(online)
    default_col = util.unroll(default)

    bit_per_bytes = 8
    nbr_bytes = len(default_col) / bit_per_bytes

    byte_col = bytelist(nbr_bytes)
    bit_col = bitlist(nbr_bytes)

    tmp = [byte_col, bit_col, decline_col, online_col, default_col]
    data = map(list, zip(*tmp))

    size = len(tmp[0])

    colums_header = ["byte", "bit", "dec", "onl", "def"]

    # Issuer Action Code row headers.
    rows_header_iac = [
        "Offline data authentication not performed", "SDA Failed",
        "ICC data missing", "Card appears on terminal exception file",
        "DDA failed", "CDA failed", "RFU", "RFU",
        "ICC and terminal diff app versions", "Expired application",
        "Application not yet effective", "Requested srvice not allowed ",
        "New card", "RFU", "RFU", "RFU",
        "Cardholder verification not successful", "Unrecognized CVM",
        "PIN Try Limit exceeded", "PIN required, pad not present/working",
        "PIN required, pad present, PIN not entered", "Online PIN entered",
        "RFU", "RFU", "Transaction exceeds floor limit",
        "Lower consecutive offline limit exceed",
        "Upper consecutive offline limit exceeded",
        "Transaction selected rand online processing",
        "Merchant forced transaction online", "RFU", "RFU", "RFU",
        "Default TDOL used", "Issuer authentication failed",
        "Script failed before final GENERATE AC",
        "Script failed after final GENERATE AC", "RFU", "RFU", "RFU", "RFU"
    ]

    # Card Issuer Action Code row headers (MasterCard specific).
    rows_header_ciac = [
        "RFU", "Unable to go online", "Offline PIN verif Not Performed",
        "Offline PIN Verification Failed", "PIN Try Limit exceeded",
        "International Transaction", "Domestic Transaction",
        "Terminal Wrongly Considers Off PIN OK",
        "Lower Consecutive Offiline Limit Exceeded",
        "Upper Consecutive Offiline Limit Exceeded",
        "Lower Cumulative Offiline Limit Exceeded",
        "Upper Cumulative Offiline Limit Exceeded",
        "Go Online On Next Transaction Was Set",
        "Issuer Authentication Failed", "Script Received", "Script Failed",
        "RFU", "RFU", "RFU", "RFU", "RFU", "RFU",
        "Match Found in Additional Check Table",
        "No Match Found In Additional Check Table"
    ]

    # Select the right title and rows_header list.
    if len(rows_header_iac) == size:
        title = "Issuer Action Code (Tag:9F0E,9F0F,9F0D)."
        rows = rows_header_iac
    elif len(rows_header_ciac) == size:
        title = "CARD Issuer Action Code (Tag:C3/CF,C5/CE,C4/CD)."
        rows = rows_header_ciac
        title
    else:
        rows = range(1, size + 1)

    return util.table(title, data, colums_header, rows)