{"id":13593614,"url":"https://github.com/devnied/EMV-NFC-Paycard-Enrollment","last_synced_at":"2025-04-09T05:31:45.828Z","repository":{"id":15729314,"uuid":"18467626","full_name":"devnied/EMV-NFC-Paycard-Enrollment","owner":"devnied","description":"A Java library used to read and extract data from NFC EMV credit cards (Android/PCSC).","archived":false,"fork":false,"pushed_at":"2024-10-03T18:18:52.000Z","size":4248,"stargazers_count":1545,"open_issues_count":22,"forks_count":616,"subscribers_count":124,"default_branch":"master","last_synced_at":"2025-04-03T10:41:51.039Z","etag":null,"topics":["android","credit-card","emv","java","java-library","nfc","tlv","track2"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devnied.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-04-05T13:47:56.000Z","updated_at":"2025-04-02T17:12:22.000Z","dependencies_parsed_at":"2022-08-03T03:15:43.418Z","dependency_job_id":"3ce9e940-2caf-47ef-8e38-d75c2b65488e","html_url":"https://github.com/devnied/EMV-NFC-Paycard-Enrollment","commit_stats":{"total_commits":322,"total_committers":5,"mean_commits":64.4,"dds":"0.024844720496894457","last_synced_commit":"0951a38920aa9970a891e122cad1ef1734e55068"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnied%2FEMV-NFC-Paycard-Enrollment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnied%2FEMV-NFC-Paycard-Enrollment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnied%2FEMV-NFC-Paycard-Enrollment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devnied%2FEMV-NFC-Paycard-Enrollment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devnied","download_url":"https://codeload.github.com/devnied/EMV-NFC-Paycard-Enrollment/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247986775,"owners_count":21028887,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","credit-card","emv","java","java-library","nfc","tlv","track2"],"created_at":"2024-08-01T16:01:22.221Z","updated_at":"2025-04-09T05:31:45.465Z","avatar_url":"https://github.com/devnied.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"## EMV NFC Paycard Enrollment ![CI](https://github.com/devnied/EMV-NFC-Paycard-Enrollment/workflows/CI/badge.svg) [![Coverage Status](https://coveralls.io/repos/github/devnied/EMV-NFC-Paycard-Enrollment/badge.svg?branch=master)](https://coveralls.io/github/devnied/EMV-NFC-Paycard-Enrollment?branch=master) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.devnied.emvnfccard/library/badge.svg?style=flat)](https://maven-badges.herokuapp.com/maven-central/com.github.devnied.emvnfccard/library) [![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)\n### Description\nJava library used to read and extract public data from NFC EMV credit cards.\u003cbr/\u003e\n\u003cbr/\u003e\nAndroid sample app available on Play store.\n\n\u003ca href=\"https://play.google.com/store/apps/details?id=com.github.devnied.emvnfccard.pro\u0026utm_source=global_co\u0026utm_medium=prtnr\u0026utm_content=Mar2515\u0026utm_campaign=PartBadge\u0026pcampaignid=MKT-AC-global-none-all-co-pr-py-PartBadges-Oct1515-1\"\u003e\u003cimg height=\"60px\" alt=\"Get it on Google Play\" src=\"https://play.google.com/intl/en_us/badges/images/apps/en-play-badge.png\" /\u003e\u003c/a\u003e\n\n### Getting started\n\nFirst you need to create a custom Provider to exchange APDU with an NFC EMV credit card ([sample here](https://github.com/devnied/EMV-NFC-Paycard-Enrollment/blob/master/sample-pcsc/src/main/java/com/github/devnied/emvpcsccard/PcscProvider.java)).\n```java\npublic class YourProvider implements IProvider {\n\n  @Override\n  public byte[] transceive(final byte[] pCommand) {\n\t // implement this\n  }\n\n  @Override\n  public byte[] getAt() {\n     // implement this to get card ATR (Answer To Reset) or ATS (Answer To Select)\n  }\n\n}\n```\n\nAfter that, create an instance of a parser and read the card.\n```java\n// Create provider\nIProvider provider = new YourProvider();\n// Define config\nConfig config = EmvTemplate.Config()\n\t\t.setContactLess(true) // Enable contact less reading (default: true)\n\t\t.setReadAllAids(true) // Read all aids in card (default: true)\n\t\t.setReadTransactions(true) // Read all transactions (default: true)\n\t\t.setReadCplc(false) // Read and extract CPCLC data (default: false)\n\t\t.setRemoveDefaultParsers(false) // Remove default parsers for GeldKarte and EmvCard (default: false)\n\t\t.setReadAt(true) // Read and extract ATR/ATS and description\n\t\t; \n// Create Parser\nEmvTemplate parser = EmvTemplate.Builder() //\n\t\t.setProvider(provider) // Define provider\n\t\t.setConfig(config) // Define config\n\t\t//.setTerminal(terminal) (optional) you can define a custom terminal implementation to create APDU\n\t\t.build();\n\t\t\n// Read card\nEMVCard card = parser.readEmvCard();\n```\ncard object contains all data read (Aid, card number, expiration date, card type, transactions history)\n\n#### Android usage\nFor android, you can create a provider with [IsoDep](https://developer.android.com/reference/android/nfc/tech/IsoDep) class:\n```java\npublic class Provider implements IProvider {\n\n\tprivate IsoDep mTagCom;\n\n\t@Override\n\tpublic byte[] transceive(final byte[] pCommand) throws CommunicationException {\n\t\t\n\t\tbyte[] response;\n\t\ttry {\n\t\t\t// send command to emv card\n\t\t\tresponse = mTagCom.transceive(pCommand);\n\t\t} catch (IOException e) {\n\t\t\tthrow new CommunicationException(e.getMessage());\n\t\t}\n\n\t\treturn response;\n\t}\n\n\t@Override\n\tpublic byte[] getAt() {\n        // For NFC-A\n\t\treturn mTagCom.getHistoricalBytes();\n\t\t// For NFC-B\n        // return mTagCom.getHiLayerResponse();\n\t}\n\n\n\tpublic void setmTagCom(final IsoDep mTagCom) {\n\t\tthis.mTagCom = mTagCom;\n\t}\n\n}\n```\n\n### Screens\n\n[![Sample demo](https://raw.githubusercontent.com/devnied/EMV-NFC-Paycard-Enrollment/master/images/demo.gif)](https://raw.githubusercontent.com/devnied/EMV-NFC-Paycard-Enrollment/master/images/demo.gif)\n\n## Download\n\n### Maven\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.devnied.emvnfccard\u003c/groupId\u003e\n  \u003cartifactId\u003elibrary\u003c/artifactId\u003e\n  \u003cversion\u003e3.0.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Gradle\n```groovy\ndependencies {\n\tcompile 'com.github.devnied.emvnfccard:library:3.0.1'\n}\n```\n\n### JAR\nYou can download this library on [Maven central](http://search.maven.org/#search%7Cga%7C1%7Cemvnfccard) or in Github [release tab](https://github.com/devnied/EMV-NFC-Paycard-Enrollment/releases)\n\n## Dependencies\n\nIf you are not using Maven or some other dependency management tool that can understand Maven repositories, the list below is what you need to run EMV-NFC-Paycard-Enrollment.\n\n## Build\n**To build the project launch:**\n```xml\nmvn clean install\n```\n## Bugs\n\nPlease report bugs and feature requests to the GitHub issue tracker.\u003cbr/\u003e\nForks and Pull Requests are also welcome.\n\n## Author\n\n**Millau Julien**\n\n+ [http://twitter.com/devnied](http://twitter.com/devnied)\n+ [http://github.com/devnied](http://github.com/devnied)\n\n\n## Copyright and license\n\nCopyright 2020 Millau Julien.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this work except in compliance with the License.\nYou may obtain a copy of the License in the LICENSE file, or at:\n\n  [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevnied%2FEMV-NFC-Paycard-Enrollment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevnied%2FEMV-NFC-Paycard-Enrollment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevnied%2FEMV-NFC-Paycard-Enrollment/lists"}