APDU command to read credit card data from visa Paywave NFC enabled card using Samsung Galaxy S4
Solution 1
Change your APDU command definition
byte[] APDUCommand = {
(byte) 0x00, // CLA Class
(byte) 0xA4, // INS Instruction
(byte) 0x04, // P1 Parameter 1
(byte) 0x00, // P2 Parameter 2
(byte) 0x07, // Length
(byte) 0xA0,0x00,0x00,0x00,0x03,0x10,0x10 // AID
};
Solution 2
As lletami answered, Visa payWave is typically selectable with the AID A0000000031010
. So you can use the APDU
00 A4 04 00 07 A0000000031010 00
to select the payWave appplication.
On contactless EMV payment cards, you could also select the PPSE (Proximity Payment System Environment) to retrieve a list of available applications (and their AIDs):
00 A4 04 00 0E 325041592E5359532E4444463031 00
Selecting the EMV payment application is only the first step. You would need to issue several further commands to get the readable credit card data (see this answer).
For instance, you could issue a GET PROCESSING OPTIONS command (see e.g. this answer, this answer and this answer).
And/or you could issue READ RECORD commands to get data from known elementary files. E.g.
00 B2 01 0C 00
to read record 1 of EF 1,
00 B2 02 0C 00
to read record 2 of EF 1, or
00 B2 01 14 00
to read record 1 of EF 2, etc.
You can get the EMV specifications for payment systems from http://www.emvco.com/ to learn about possible commands and data structures.
user3816152
Updated on June 26, 2022Comments
-
user3816152 about 2 years
byte[] APDUCommand = { (byte) 0x00, // CLA Class (byte) 0xA4, // INS Instruction (byte) 0x04, // P1 Parameter 1 (byte) 0x00, // P2 Parameter 2 (byte) 0x0A, // Length 0x63,0x64,0x63,0x00,0x00,0x00,0x00,0x32,0x32,0x31 // AID }; Intent intent = getIntent(); Tag tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG); IsoDep iso = IsoDep.get(tag); iso.connect(); byte[] result = iso.transceive(APDUCommand);
I am using the above code to read VisaPayWave NFC card details(card holder's name, expiry date, card number etc) using samsung galaxy s4. The output that i am getting is [106,-126]. I think the APDU command i am using is not correct. Kindly suggest the correct command.
-
user3816152 almost 10 yearsit is not working. Can anybody please suggest what is it that i am doing wrong. Do i need multiple APDU commands to read all the data? If yes please let me know the algorithm or the code.
-
lletami almost 10 yearsThis command is the first step. First you need to select the applet so that then you can read the data. You need to make sure the applet is activated.