Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Country names and alphabetic country codes #9

Open
jnareb opened this issue Jan 12, 2015 · 2 comments
Open

Country names and alphabetic country codes #9

jnareb opened this issue Jan 12, 2015 · 2 comments

Comments

@jnareb
Copy link

jnareb commented Jan 12, 2015

I'd like to report that the app works for MasterCard Debit issued by mBank S.A. (a Polish bank), though all of the following CPLC data is reported as unknown IC Fabricator (0x4070), IC Type (0x5144), IC ModuleFabricator (0x1002), ICC Manufacturer (0x4193), Prepersonalization Identifier (0x4194).

I'd like to ask if there are plans to support either alphanumeric (two-letter and three-letter) country codes, and/or English country names - the ISO 3166-1 numeric three-digit country codes? Well, at least there is no country name for Poland (PL, POL)... BTW what's with leading 0 - the code is 616 not 0616; is it raw value?

@johnzweng
Copy link
Owner

hi @jnareb, thank you for the feedback!

Regarding your points:

CPLC:
Sorry, I didn't have much documentation on how this data is encoded, especially I didn't find a list of all fabricator IDs, IC type IDs, etc.. So for all data I cannot interpret, I just print the raw hex value for the moment. I do not know very much about CPLC. Is this type of information standardized (I guess so)? Maybe you can point me to any resource where to find more information? Are there any manufacturer lists, etc. somewhere online?

Country Codes / Names:
I did not exactly understand the question. Where should alphanumeric country codes be supported (at which parts of the application)? Uh, I guess I know what you mean. I already have support for displaying country codes alphanumerically, but (I am lazy) at the moment not all countries are covered. Yes, Poland was not covered until now. I will complete the list.

And regarding the leading 0:
Yes, you guessed correctly, the ISO codes have three digits (for example Austria is "040") but in EMV cards this info is stored in BCD notation, using two bytes, which means "040" will end up in the card in 2 bytes: 0x00 0x40. But you are correct, the first digit only can only be 0 (as the ISO 3166-1 codes are only 3 digits).

I will update the ISO codes in the next version. :)

@jnareb
Copy link
Author

jnareb commented Jan 16, 2015

I already have support for displaying country codes alphanumerically, but (I am lazy) at the moment not all countries are covered. Yes, Poland was not covered until now. I will complete the list.

Instead of writing list by hand, you can use numeric to alpha-2 ISO 3166-1 country codes gist (created using Locale::Country Perl module ;) )

Just say in what format you need it...

@jnareb jnareb closed this as completed Jan 16, 2015
@jnareb jnareb reopened this Jan 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants