MichaelsPlayground / TalkToYourCreditCardPart7

This is (the final) part 7 of the Talk to your Credit Card series
4 stars 6 forks source link
android credit-cards emv java nfc

Talk to your Credit Card part 7 (final app)

This app shows how to talk with a Credit Card and get information's like the Credit Card number, the card's expiration date and some other data.

The description can be found in an article series on medium.com: https://medium.com/@androidcrypto/talk-to-your-credit-card-part-7-find-and-print-out-the-application-primary-account-number-52b24b396082

The app uses the NFC ReaderMode to get access to the card.

There are apps available for each step in my GitHub repository - the naming shows the step that has the code including this step.

This is the app for the (final) seventh step 7: find and print out the "Application Primary Account Number" ("PAN") = card number in TalkToYourCreditCardPart7.

The app is tested on real Android devices running Android versions 5.0.1, 8.0 and 13.

A compiled version of the app is available in the "debug-release" folder of this repository: app-debug.apk

These are the steps to read a payment card, it is a kind of "question & answer" workflow:

step 2: after reading a Credit Card step 2: after reading a Credit Card

In AndroidManifest.xml grant these permissions:

    <uses-permission android:name="android.permission.NFC" />
    <uses-permission android:name="android.permission.VIBRATE" />

There are 3 dependencies necessary for the app to run:

build.gradle:

    // parsing BER-TLV encoded data, e.g. a credit card
    // source: https://github.com/evsinev/ber-tlv
    implementation 'com.payneteasy:ber-tlv:1.0-11'

    // pretty printing of card's responses
    // source: https://github.com/devnied/EMV-NFC-Paycard-Enrollment
    implementation 'com.github.devnied.emvnfccard:library:3.0.1'

    // implementing an about page
    implementation 'io.github.medyo:android-about-page:2.0.0'

Library ber-tlv

Source code: https://github.com/evsinev/ber-tlv

License: Apache-2.0 license

Library: EMV-NFC-Paycard-Enrollment

Source code: https://github.com/devnied/EMV-NFC-Paycard-Enrollment

License: Apache-2.0 license

Library: Android About Page

Source code: https://github.com/medyo/android-about-page

License: The MIT License (MIT)

Sound resources for pings

https://m2.material.io/design/sound/sound-resources.html

Licensed under Attribution 4.0 International (CC BY 4.0): https://creativecommons.org/licenses/by/4.0/legalcode

Find a complete logfile after reading a Credit Card with the app with the link.