A dart package for decode and encode emv QR code

Overview

a dart package for decode and encode emv QR code

Usage

  • MPM

Decode func

${emvdecode.toJson()}");">
    final emvdecode = EMVMPM.decode(emvqr);
    debugPrint("emv decode ------> ${emvdecode.toJson()}");

Generate func

${emv.value.toJson()}"); final emvEncode = EMVMPM.encode(emv); debugPrint("emv encode -------> ${emvEncode.toJson()}");">
    final emv = EMVQR();

    emv.setPayloadFormatIndicator("00");
    emv.setPointOfInitiationMethod("12");

    /// merchant account information
    final mcAccountInfo = MerchantAccountInformation();
    mcAccountInfo.setGloballyUniqueIdentifier("IT");
    mcAccountInfo.addPaymentNetworkSpecific(id: "01", value: "abc");
    mcAccountInfo.addPaymentNetworkSpecific(id: "02", value: "def");
    emv.addMerchantAccountInformation(id: "03", value: mcAccountInfo);

    final additionalData = AdditionalDataFieldTemplate();
    additionalData.setBillNumber("aaaa");
    additionalData.setMerchantTaxID("111");
    additionalData.setMerchantChannel("cha");
    additionalData.addRfuForEMVCo(id: "12", value: "00");
    additionalData.addPaymentSystemSpecific(id: "50", value: "123");
    additionalData.addPaymentSystemSpecific(id: "51", value: "123");
    emv.setAdditionalDataFieldTemplate(additionalData);

   
    final mcInfoLang = MerchantInformationLanguageTemplate();
    mcInfoLang.setLanguagePreferencer("LA");
    mcInfoLang.setMerchantCity("Vientaine");
    mcInfoLang.setMerchantName("MW");
    mcInfoLang.addRfuForEMVCo(id: "03", value: "asfg");
    mcInfoLang.addRfuForEMVCo(id: "04", value: "asfg");
    emv.setMerchantInformationLanguageTemplate(mcInfoLang);

    emv.addRfuForEMVCo(id: "66", value: "bbb");

    final unreserved = UnreservedTemplate();
    unreserved.setGloballyUniqueIdentifier("abs");
    unreserved.addContextSpecificData(id: "01", value: "qw12");
    emv.addUnreservedTemplate(id: "89", value: unreserved);

    debugPrint("emv body ----------> ${emv.value.toJson()}");

    final emvEncode = EMVMPM.encode(emv);
    debugPrint("emv encode -------> ${emvEncode.toJson()}");

add Merchant Account Information function

    final mcAccountInfo = MerchantAccountInformation();

add Additional Data Field Template function

    final additionalData = AdditionalDataFieldTemplate();

add Merchant Information Language Template function

    final mcInfoLang = MerchantInformationLanguageTemplate();

add Unreserved Template function

    final unreserved = UnreservedTemplate();

TODO

  • implement CPM

Credits

You might also like...

AsyncCallQueue is a Dart class which provides a queuing mechanism to prevent concurrent access to asynchronous code.

async_call_queue AsyncCallQueue is a Dart class which provides a queuing mechanism to prevent concurrent access to asynchronous code. Getting Started

Jan 18, 2022

A flutter plugin for execute dart code in background.

flutter_background_service A flutter plugin for execute dart code in background. Android No additional setting required. To change notification icon,

Dec 27, 2022

Reflectable is a Dart library that allows programmers to eliminate certain usages of dynamic reflection by specialization of reflective code to an equivalent implementation using only static techniques

Reflectable is a Dart library that allows programmers to eliminate certain usages of dynamic reflection by specialization of reflective code to an equivalent implementation using only static techniques. The use of dynamic reflection is constrained in order to ensure that the specialized code can be generated and will have a reasonable size.

Dec 31, 2022

A Dart build script that downloads the Protobuf compiler and Dart plugin to streamline .proto to .dart compilation.

A Dart build script that downloads the Protobuf compiler and Dart plugin to streamline .proto to .dart compilation.

Oct 26, 2022

Get Version - Get the Version Name, Version Code, Platform and OS Version, and App ID on iOS and Android. Maintainer: @rodydavis

Get Version - Get the Version Name, Version Code, Platform and OS Version, and App ID on iOS and Android. Maintainer: @rodydavis

Get Version - Get the Version Name, Version Code, Platform and OS Version, and App ID on iOS and Android.

Jan 4, 2023

A package that lets you include a cool, nice looking and validated Password TextFormField in your app to enhance user experience. The package is fully & easily modifiable.

A package that lets you include a cool, nice looking and validated Password TextFormField in your app to enhance user experience. The package is fully & easily modifiable.

A package that lets you include a cool, nice looking and validated Password TextFormField in your app to enhance user experience. The package is fully

Jun 7, 2022

A dart package to help you parse and evaluate infix mathematical expressions into their prefix and postfix notations.

A dart package to help you parse and evaluate infix mathematical expressions into their prefix and postfix notations.

Jan 28, 2022

Starter project and code generator for Flutter/Redux

Starter project and code generator for Flutter/Redux

Flutter Redux Starter/Code Generator Videos Short video ~ 1 minute Long video ~ 10 minutes We're using this approach to develop the Flutter app for In

Dec 12, 2022

Swagger/OpenAPI code generator based on Chopper and JsonAnnotation for Flutter

Swagger/OpenAPI code generator based on Chopper and JsonAnnotation for Flutter

Code partially generated with chopper 📣 Build dart types from Swagger/OpenAPI schemas SwaggerDartCodeGenerator is a code generator that looks for *.s

Jan 5, 2023
Comments
  • fix: invalid length value

    fix: invalid length value

    thanks for the library, it's very helpful. but there is a problem when specifying length value of 10 chars which causes invalid qr.

    example value: 'ABCDEFGHIJ' expected result: '10' actual result: '010'

    bug 
    opened by SimiPrambos 1
  • modified to able to parse code including multibyte chars

    modified to able to parse code including multibyte chars

    @LaoitdevOpen Hello, I am Rie Ono from Japan. Thank you for the implementation of EMVCo library! I would like to use this library. I noticed that I could not parse QR codes including multi-byte chars like Japanese. The cause of this issue, utf8.encode() will return the bytes of only alphanumeric chars. Could you check my fix? Best Regards,

    bug 
    opened by s9727 1
Releases(v1.0.5)
Owner
Laoitdev Open
Official laoitdev opensource project
Laoitdev Open
A Dart package to web scraping data from websites easily and faster using less code lines.

Chaleno A flutter package to webscraping data from websites This package contains a set of high-level functions that make it easy to webscrap websites

António Nicolau 30 Dec 29, 2022
VS Code `.code-workspace` file generator

VS Code .code-workspace file generator (for monorepositories with Dart and Flutter projects) TL;DR; Create yaml file config.yaml (check #Format sectio

Mike T 1 Feb 18, 2022
The Dart code generator for your package versions. 🎯

The Dart code generator for your package versions. There is no way to get the package version from the code in the Dart ecosystem. Installation Add bu

Daichi Furiya 12 Dec 14, 2022
The diozz package helps you to deal with APIs easily and speed up the process of writing code.

Diozz The diozz package helps you to deal with APIs easily and speed up the process of writing code. Installation Diozz Use that command in the termin

Mohamed Abu.elezz 4 Nov 13, 2022
A Dart package which supports checking if a current package is up-to-date.

pub_updater A Dart package which enables checking whether packages are up to date and supports updating them. Intended for use in CLIs for prompting u

Very Good Open Source 47 Oct 27, 2022
🚀The Flutter dart code generator from zeplin. ex) Container, Text, Color, TextStyle, ... - Save your time.

Flutter Gen Zeplin Extension ?? The Flutter dart code generator from zeplin. ex) Container, Text, Color, TextStyle, ... - Save your time. ⬇ 1.1k Getti

NAVER 49 Oct 12, 2022
Basic Dart reverse shell code

dart_rs Basic Dart reverse shell based on this one by Potato-Industries. Pretty self explanatory. You’ll need Windows. I used a Windows 7 64-bit VM. F

null 21 Oct 2, 2022
Provides API to generate Dart source code

DartWriter DartWriter provides API to generate Dart source code. It can make your job easier while developing flutter/dart tools. You can also generat

Ahmet ÇELİK 11 Oct 24, 2022
Dart Code Generator for generating mapper classes

Smartstruct - Dart bean mappings - the easy nullsafe way! Code generator for generating type-safe mappers in dart, inspired by https://mapstruct.org/

Nils 28 Nov 29, 2022
A Dart testing utility for asserting that some code emits a compilation error.

A Dart testing utility for asserting that some code emits a compilation error.

Remi Rousselet 32 Dec 11, 2022