Add sample for Visa and Mastercard APDUs

This commit is contained in:
Ondrej Mikle 2015-12-06 16:23:55 +01:00
parent 26ec2ef853
commit 746cf9da63

View file

@ -18,6 +18,26 @@ hex_apdus = [
# "00 01 38 00 09 53 61 6D 70 6C 65 20 23 32"
#]
# Mastercard payment via 2PAY.SYS.DDF01 smartcard application
#hex_apdus = [
# "00 a4 04 00 0e 32 50 41 59 2e 53 59 53 2e 44 44 46 30 31 00", #select 2PAY.SYS.DDF01
# "00 a4 04 00 07 a0 00 00 00 04 10 10 00", # select Mastercard app a0 00 00 00 04 10 10
# "80 a8 00 00 02 83 00 00", # get processing options
# "00 b2 01 14 00", # read record 01 14 (contains CDOL1)
# "00 b2 01 1c 00", # read record 01 1c (contains issuer's public key and certificate)
# "00 b2 01 24 00", # read record 01 24 (contains ICC public key)
# "00 b2 02 24 00", # read record 02 24 (contains ICC certificate)
# # generate application cryptogram - sign the payment for 50 CZK (data formatted according to CDOL1)
# "80 ae 50 00 2b 00 00 00 00 50 00 00 00 00 00 00 00 02 03 00 00 00 00 00 02 03 14 03 14 00 cb 6d 9a 2c 22 00 00 00 00 00 00 00 00 00 00 1f 03 00 00"
#]
# Visa read track 2 equivalent data - contains card number, cardholder name, etc
#hex_apdus = [
# "00 A4 04 00 07 A0 00 00 00 03 10 10 00", # select VISA app A0 00 00 00 03 10 10
# "00 B2 02 0C 00" # select record 02 0c - Track 2 Equivalent Data
#]
apdus = [hex_apdu.replace(" ","").decode("hex") for hex_apdu in hex_apdus]
try: