Question

I'm trying to read name, card number, expiry date etc on Credit Card. but always return 6d00 when call SCardTransmit.

I'm using pre-define AID, which i have googled to be valid (correct me if i'm wrong). here's the are :

AID_LIST = { 
  "A0000000421010",
  "A0000000422010",
  "A0000000031010",
  "A0000000032010",
  "A0000000041010",
  "A0000000042010",
  "A00000006900",
  "A0000001850002"
}

Thanks in advance.

Était-ce utile?

La solution

I am not familiar with this API you are using, but you will have to send the following sequence of APDU commands:

  1. SELECT PSE (for contact card), specified by EMV in Book 1, 11.3. An example is "00A404000E315041592E5359532E444446303100"
  2. With the SFI returned, you can read the records to find out the supported AIDs. But, you can do this by "trial and error" using the pre-defineds AID that you specified and call SELECT AID, following the guidelines on Book 1, 12.3.3.
  3. You may either call the command "GET PROCESSING OPTIONS" to see what records are available to read or you can read all possible records calling the "READ RECORD" command making a scan of the possible records. In one of those records, you will have the data you are looking for.

Usually in the same record you will have stored the Cardholder name, PAN and Track 2 discretionary data (in which is contained the expiration date).

The tags are listed in Book 3.

Application Primary Account Number (PAN) - 5A Cardholder name - 5F20 Track 2 Discretionary Data - 9F20

Usefull info about Track 2: http://en.wikipedia.org/wiki/Magnetic_stripe_card

A sample of the sequence above: http://code.google.com/p/javaemvreader/wiki/ExampleOutput

EMV Specs: http://www.emvco.com/specifications.aspx?id=223

The possible return codes, such as 61XX, 9000, etc are listed in ISO 7816. Here's a good overview: http://www.cardwerk.com/smartcards/smartcard_standard_ISO7816-4_5_basic_organizations.aspx

Autres conseils

You need to lookup/buy ISO 7816, the EMV specifications and your vendors card specifications otherwise you don't know what you are doing.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top