Voltar ao ranking

devnied/EMV-NFC-Paycard-Enrollment

Java

A Java library used to read and extract data from NFC EMV credit cards (Android/PCSC).

androidjavaemvnfcjava-librarycredit-cardtlvtrack2
Crescimento de estrelas
Estrelas
1.6k
Forks
642
Crescimento semanal
Issues
11
5001k1.5k
abr. de 2014mai. de 2018jun. de 2022jul. de 2026
ArtefatosMavengit clone https://github.com/devnied/EMV-NFC-Paycard-Enrollment.git
README

EMV NFC Paycard Enrollment CI Coverage Status

Description

Java library used to read and extract public data from NFC EMV credit cards.

Android sample app available on Play store.

Get it on Google Play

Getting started

First you need to create a custom Provider to exchange APDU with an NFC EMV credit card (sample here).

public class YourProvider implements IProvider {

  @Override
  public byte[] transceive(final byte[] pCommand) {
	 // implement this
  }

  @Override
  public byte[] getAt() {
     // implement this to get card ATR (Answer To Reset) or ATS (Answer To Select)
  }

}

After that, create an instance of a parser and read the card.

// Create provider
IProvider provider = new YourProvider();
// Define config
Config config = EmvTemplate.Config()
		.setContactLess(true) // Enable contact less reading (default: true)
		.setReadAllAids(true) // Read all aids in card (default: true)
		.setReadTransactions(true) // Read all transactions (default: true)
		.setReadCplc(false) // Read and extract CPCLC data (default: false)
		.setRemoveDefaultParsers(false) // Remove default parsers for GeldKarte and EmvCard (default: false)
		.setReadAt(true) // Read and extract ATR/ATS and description
		; 
// Create Parser
EmvTemplate parser = EmvTemplate.Builder() //
		.setProvider(provider) // Define provider
		.setConfig(config) // Define config
		//.setTerminal(terminal) (optional) you can define a custom terminal implementation to create APDU
		.build();
		
// Read card
EMVCard card = parser.readEmvCard();

card object contains all data read (Aid, card number, expiration date, card type, transactions history)

Android usage

For android, you can create a provider with IsoDep class:

public class Provider implements IProvider {

	private IsoDep mTagCom;

	@Override
	public byte[] transceive(final byte[] pCommand) throws CommunicationException {
		
		byte[] response;
		try {
			// send command to emv card
			response = mTagCom.transceive(pCommand);
		} catch (IOException e) {
			throw new CommunicationException(e.getMessage());
		}

		return response;
	}

	@Override
	public byte[] getAt() {
        // For NFC-A
		return mTagCom.getHistoricalBytes();
		// For NFC-B
        // return mTagCom.getHiLayerResponse();
	}


	public void setmTagCom(final IsoDep mTagCom) {
		this.mTagCom = mTagCom;
	}

}

Screens

Sample demo

Download

Maven

<dependency>
  <groupId>com.github.devnied.emvnfccard</groupId>
  <artifactId>library</artifactId>
  <version>3.1.0</version>
</dependency>

Gradle

dependencies {
	compile 'com.github.devnied.emvnfccard:library:3.1.0'
}

JAR

You can download this library on Maven central or in Github release tab

Dependencies

If 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.

Build

To build the project launch:

mvn clean install

Bugs

Please report bugs and feature requests to the GitHub issue tracker.
Forks and Pull Requests are also welcome.

Author

Millau Julien

Copyright 2020-2026 Millau Julien.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Repositórios relacionados
flutter/flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond

DartBSD 3-Clause "New" or "Revised" Licensemobileandroid
flutter.dev
177.9k30.7k
Genymobile/scrcpy

Display and control your Android device

CApache License 2.0androidc
146.1k13.5k
react/react-native

A framework for building native applications using React

C++MIT Licenseandroidapp-framework
reactnative.dev
126.2k25.2k
facebook/react-native

A framework for building native applications using React

C++MIT Licenseandroidapp-framework
reactnative.dev
120.9k24.5k
rustdesk/rustdesk

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

Rustcrates.ioGNU Affero General Public License v3.0remote-controlremote-desktop
rustdesk.com
118.6k18.1k
justjavac/free-programming-books-zh_CN

:books: 免费的计算机编程类中文书籍,欢迎投稿

GNU General Public License v3.0pythonjavascript
weibo.com/justjavac
117.7k28.2k
Hack-with-Github/Awesome-Hacking

A collection of various awesome lists for hackers, pentesters and security researchers

Creative Commons Zero v1.0 Universalhackingsecurity
116.6k10.5k
tldr-pages/tldr

Collaborative cheatsheets for console commands 📚.

MarkdownOthershellman-page
tldr.sh
63.2k5.3k
Solido/awesome-flutter

An awesome list that curates the best Flutter libraries, tools, tutorials, articles and more.

Dartflutterawesome-list
60.7k6.9k
2dust/v2rayNG

A V2Ray client for Android, support Xray core and v2fly core

KotlinGNU General Public License v3.0androidproxy
v2rayng.2dust.link
59.9k7.8k
termux/termux-app

Termux - a terminal emulator application for Android OS extendible by variety of packages.

JavaMavenOtherandroidterminal
f-droid.org/en/packages/com.termux
57.9k7k
wasabeef/awesome-android-ui

A curated list of awesome Android UI/UX libraries

MIT Licenseandroidawesome
56.9k10.3k