Git Product home page Git Product logo

emv-qrcode's People

Contributors

dependabot[bot] avatar mvallim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emv-qrcode's Issues

Get Qr code!

Hello, please, I have a problem, how to get the Qr code with the string which is displayed with the toString method? thank you

Scope: 'AdditionalDataField' invalid '00' tag

Describe the bug
Scope: 'AdditionalDataField' invalid '00' tag returned with com.emv.qrcode.core.exception.InvalidTagException

To Reproduce
Steps to reproduce the behavior:
DecoderMpm.decode(value, MerchantPresentedMode.class);
Value Ex: 0002010102112632002816728000581200000000849800025204581253031445502015802LK5925Burger's King and Family 6007Colombo610500800625800329459b40e599f4d96ac78d689dc388f2205181630921441682-0002630408AF

Expected behavior
Returning MerchantPresentedMode object without error

Implement EMV QR Code v1.1 Specification

Hi,

The documentation mentions compatibility with v1.1 of the EMV QR Code Specification. However, it seems that the library uses the v1.0 Specification from 2017 (in the docs folder), leading to the absence of certain features.

For example, I need to use new fields that were added in v1.1 in the Additional Data Field Template (ID "62") and are not implemented in the library :
- Merchant Tax Id (ID "10")
- Merchant Channel (ID "11")

image

As a workaround, I've incorporated these fields into the "RFU for EMVCo," enabling the use of IDs 10 and 11 but it would nice to update the library to accommodate the new specification. I've only noticed this particular example so I didn't check whether v1.1 is partially supported or not supported at all.

Merchant Account Information "02" to "25" should be primitive data objects

Hi,
I have been provided some reserved merchant account information within the range of fields "02" to "25". The object provided is a primitive data object and not in a template. It seems in your code you are assuming "02" to "51" as Merchant Account Information Templates. However "02" to "25" are referred to in the EMVCO spec as primitive data objects.

Happy to help contribute in code. However this is an interesting structural change as "02" to "51" are all Merchant Account Information but since some return primitives and some return templates there would need to be some separation of gets, sets and adds.
Maybe a getMerchantAccountInformation() for "02" to "25" and a getMerchantAccountInformationTemplates() for "26" to "51"

java.lang.NoClassDefFoundError when decoding MerchantPresentedModeDecoder

Describe the bug
In some devices LG for example I got this error
java.lang.NoClassDefFoundError: com.emv.qrcode.decoder.mpm.MerchantPresentedModeDecoder$$ExternalSyntheticLambda9
at
DecoderMpm.decode(qrString, MerchantPresentedMode::class.java)

To Reproduce
This is the string i'm trying to decode
00020101021127140001101056896328130009780780754520448295802YE59020160020161051111164450002ar0119محمد فؤاد محمد شايف0212امانة لعاصمة53038866304DE06

Smartphone (please complete the following information):

  • Device: [LG Stylo 2]
  • OS: [6.0.1, 5.0.2]

Additional context
Part of the stack trace

at com.emv.qrcode.decoder.mpm.MerchantPresentedModeDecoder.<clinit>(MerchantPresentedModeDecoder.java:29)
at java.lang.reflect.Constructor.newInstance(Native Method)
at com.emv.qrcode.decoder.mpm.DecoderMpm.decode(DecoderMpm.java:49)```

Update

I guess the problem with Android 6 and earlier

More extensible for loading decoder

Is your feature request related to a problem? Please describe..
I had come across a same as issue #29 while trying to parse some QRCodes from Phillipines based on the EMVco standard. From the issue #29, I think the example was from Sri Lanka Rupee because the country code is 144.Maybe there are some country implementing the QRcode payment system based on the EMVco specification with a slight difference.

Describe the solution you'd like to see.
By default,all decoders follow the EMVco specification.Also,provide a flexible,extensible way to load another decoder for the same identifier.For example,provide a way to replace the AdditionalDataFieldDecoder,under the ID=62,with a custom decoder in the DecodersMpmMap class.This decoder should be able to decode the QRcode from Phillipines.

CRC16 Validating forcing the UTF-8 charset

@mvallim

MerchantPresentedModeValidator uses the bytes from UTF-8 charset if any EMV string is sent with a different charset than UTF-8
it becomes impossible to do its validation.

private static Function<MerchantPresentedMode, String> calcCrc16(Function<MerchantPresentedMode, String> fnc) {
    return (obj) -> {
        return String.format("%04X", CRC.crc16(((String)fnc.apply(obj)).getBytes(StandardCharsets.UTF_8)));
    };
}

I suggest remove you to remove and do a simple .getBytes() with no charset definition.

Regards,

CPM

Hi,
I am trying just wondering how I can read my credit card data to generate EMV QR code.
Also for QR Code transaction where I have to include amount in example it is not clear.
Any help will be appreciated.

Support for ISO 18004

Could please confirm if this lib has capability to generate ISO 18004 QR code if not does zing does?

EmvCard Object To CPM

Hi @mvallim ,
As per your suggestion I have tried to create CPM BAS64 by using this android NFC library it after tapping it will return this EmvCard object.
Now I have to use data returned by EmvCard and create CPM.
Here is the code I have written

public class EMVQRCode {

    public static String from(EmvCard card)
    {
        final ConsumerPresentedMode consumerPresentedMode = new ConsumerPresentedMode();
        com.emv.qrcode.model.cpm.CommonDataTemplate cdt= new CommonDataTemplate();
        if (!card.getApplications().isEmpty())
        {
            for (Application app: card.getApplications())
            {
                final ApplicationTemplate applicationTemplate = new ApplicationTemplate();
                applicationTemplate.setApplicationDefinitionFileName(BytesUtils.bytesToString( app.getAid()));
                applicationTemplate.setApplicationLabel(app.getApplicationLabel());
                applicationTemplate.setApplicationTransactionCounter(String.valueOf(app.getTransactionCounter()));
                String name=StringUtils.EMPTY;
                  if (StringUtils.isNotBlank(card.getHolderFirstname()))
                  {
                      name=card.getHolderFirstname()+" "+StringUtils.trimToEmpty(card.getHolderLastname());
                  }

                consumerPresentedMode.addApplicationTemplate(applicationTemplate);
            }
        }

        final CommonDataTransparentTemplate commonDataTransparentTemplate = new CommonDataTransparentTemplate();
        commonDataTransparentTemplate.setTrack2EquivalentData(BytesUtils.bytesToStringNoSpace(card.getTrack2().getRaw()));

        final CommonDataTemplate commonDataTemplate = new CommonDataTemplate();
        commonDataTemplate.setTrack2EquivalentData(BytesUtils.bytesToStringNoSpace(card.getTrack2().getRaw()));
        commonDataTemplate.setApplicationPAN(card.getTrack2().getCardNumber());
        commonDataTemplate.setCommonDataTransparentTemplate(commonDataTransparentTemplate);
        PayloadFormatIndicator pfv=new PayloadFormatIndicator();
        pfv.setValue("CPV01");
        consumerPresentedMode.setPayloadFormatIndicator(pfv);
        consumerPresentedMode.setCommonDataTemplate(commonDataTemplate);
        return  consumerPresentedMode.toBase64();
    }

}

Could please help me to make this mapping correct, thanks for help in advance

NoSuchMethodException when using proguard

Describe the bug
I got java.lang.NoSuchMethodException: com.emv.qrcode.decoder.mpm.MerchantPresentedModeDecoder. when usign proguard while decoding the qr string
I already tried to exclude the library classes in proguard rules
-keep class com.emv.qrcode.model.mpm.** {*;}
but it is not working.

To Reproduce
Steps to reproduce the behavior:

  1. Go to app build.gradle
  2. adding the debug buildTypes
    minifyEnabled true
    shrinkResources true
    proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'

Expected behavior
Decoded QR string successfully

Smartphone (please complete the following information):

  • Device: Samsung s22
  • OS: Android 13

Additional context
Note: when not using proguard shrinking resource feature it works

Duplicate class found in modules jetified-aspectjrt-1.9.6

I've added this using Gradle inside the Android Studio. But when I run the project, these errors showing.

Duplicate class org.aspectj.internal.lang.annotation.ajcDeclareAnnotation found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.annotation.ajcDeclareEoW found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.annotation.ajcDeclareParents found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.annotation.ajcDeclarePrecedence found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.annotation.ajcDeclareSoft found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.annotation.ajcITD found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.annotation.ajcPrivileged found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.reflect.AdviceImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.reflect.AdviceImpl$1 found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.reflect.AjTypeImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.reflect.DeclareAnnotationImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.reflect.DeclareAnnotationImpl$1 found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.reflect.DeclareErrorOrWarningImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.reflect.DeclareParentsImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.reflect.DeclarePrecedenceImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.reflect.DeclareSoftImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.reflect.InterTypeConstructorDeclarationImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.reflect.InterTypeDeclarationImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.reflect.InterTypeFieldDeclarationImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.reflect.InterTypeMethodDeclarationImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.reflect.PerClauseImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.reflect.PointcutBasedPerClauseImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.reflect.PointcutBasedPerClauseImpl$1 found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.reflect.PointcutExpressionImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.reflect.PointcutImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.reflect.SignaturePatternImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.reflect.StringToType found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.reflect.StringToType$1 found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.reflect.TypePatternBasedPerClauseImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.internal.lang.reflect.TypePatternImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.Aspects found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.Aspects14 found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.JoinPoint found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.JoinPoint$EnclosingStaticPart found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.JoinPoint$StaticPart found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.NoAspectBoundException found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.ProceedingJoinPoint found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.Signature found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.SoftException found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.annotation.AdviceName found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.annotation.After found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.annotation.AfterReturning found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.annotation.AfterThrowing found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.annotation.Around found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.annotation.Aspect found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.annotation.Before found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.annotation.DeclareAnnotation found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.annotation.DeclareError found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.annotation.DeclareMixin found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.annotation.DeclareParents found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.annotation.DeclarePrecedence found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.annotation.DeclareWarning found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.annotation.Pointcut found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.annotation.RequiredTypes found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.annotation.SuppressAjWarnings found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.annotation.control.CodeGenerationHint found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.internal.lang.PlaceHolder found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.Advice found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.AdviceKind found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.AdviceSignature found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.AjType found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.AjTypeSystem found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.CatchClauseSignature found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.CodeSignature found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.ConstructorSignature found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.DeclareAnnotation found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.DeclareAnnotation$Kind found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.DeclareErrorOrWarning found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.DeclareParents found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.DeclarePrecedence found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.DeclareSoft found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.FieldSignature found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.InitializerSignature found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.InterTypeConstructorDeclaration found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.InterTypeDeclaration found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.InterTypeFieldDeclaration found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.InterTypeMethodDeclaration found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.LockSignature found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.MemberSignature found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.MethodSignature found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.NoSuchAdviceException found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.NoSuchPointcutException found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.PerClause found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.PerClauseKind found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.Pointcut found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.PointcutBasedPerClause found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.PointcutExpression found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.SignaturePattern found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.SourceLocation found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.TypePattern found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.TypePatternBasedPerClause found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.lang.reflect.UnlockSignature found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.CFlow found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.internal.AroundClosure found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.internal.CFlowCounter found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.internal.CFlowPlusState found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.internal.CFlowStack found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.internal.Conversions found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.internal.PerObjectMap found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.internal.cflowstack.ThreadCounter found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.internal.cflowstack.ThreadCounterImpl11 found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.internal.cflowstack.ThreadCounterImpl11$Counter found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.internal.cflowstack.ThreadStack found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.internal.cflowstack.ThreadStackFactory found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.internal.cflowstack.ThreadStackFactoryImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.internal.cflowstack.ThreadStackFactoryImpl$1 found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.internal.cflowstack.ThreadStackFactoryImpl$ThreadCounterImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.internal.cflowstack.ThreadStackFactoryImpl$ThreadCounterImpl$Counter found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.internal.cflowstack.ThreadStackFactoryImpl$ThreadStackImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.internal.cflowstack.ThreadStackFactoryImpl11 found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.internal.cflowstack.ThreadStackImpl11 found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.reflect.AdviceSignatureImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.reflect.CatchClauseSignatureImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.reflect.CodeSignatureImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.reflect.ConstructorSignatureImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.reflect.Factory found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.reflect.FieldSignatureImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.reflect.InitializerSignatureImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.reflect.JoinPointImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.reflect.JoinPointImpl$EnclosingStaticPartImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.reflect.JoinPointImpl$StaticPartImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.reflect.LockSignatureImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.reflect.MemberSignatureImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.reflect.MethodSignatureImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.reflect.SignatureImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.reflect.SignatureImpl$Cache found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.reflect.SignatureImpl$CacheImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.reflect.SourceLocationImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.reflect.StringMaker found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)
Duplicate class org.aspectj.runtime.reflect.UnlockSignatureImpl found in modules jetified-aspectjrt-1.9.6 (org.aspectj:aspectjrt:1.9.6) and jetified-aspectjweaver-1.9.6 (org.aspectj:aspectjweaver:1.9.6)

Here is how I added into using Gradle inside build.gradle (APP)

dependencies {
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.3.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.0'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.0'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

    implementation 'com.github.mvallim:emv-qrcode:0.1.1'
}

CRC16 Validation - MPM

Boa noite, Marcos.

Houve a remoção da validação do CRC16 (presença do campo e cálculo) no QR Code (MPM) ?
Se sim, a lib proporciona alguma outra forma de efetuar essa validação?

Edit: Acabei de encontrar o CRC16 Validator na lib. Perdão, hehe

java.lang.NoSuchMethodError: No static method decodeHex(Ljava/lang/String;)[B in class Lorg/apache/commons/codec/binary/Hex; or its super classes (declaration of 'org.apache.commons.codec.binary.Hex' appears in /system/framework/org.apache.http.legacy.boot.jar)

Describe the bug
java.lang.NoSuchMethodError: No static method decodeHex(Ljava/lang/String;)[B in class Lorg/apache/commons/codec/binary/Hex; or its super classes (declaration of 'org.apache.commons.codec.binary.Hex' appears in /system/framework/org.apache.http.legacy.boot.jar)
at com.emv.qrcode.core.model.cpm.BERTLBinary.toPrimitives(BERTLBinary.java:35)
at com.emv.qrcode.core.model.cpm.BERTLBinary.(BERTLBinary.java:26)

To Reproduce
Steps to reproduce the behavior:

  1. Downgrade API Level to 26

I am getting this error while targeting to android 8 and 8.1

Localization Bug

When the app localized in Arabic some of the fields returned mix of Arabic and English numbers

Error in app release version

Describe the bug
I tested in debug version, I'm able to scan QR code and retrieved the values. But I tested in release version I received this error after I scan the QR code.

Error that got is
java.lang.NoSuchMethodException:e.d.a.b.a.v0.[class java.lang.String]

To Reproduce
Steps to reproduce the behavior:

  1. Run an app in release version.
  2. Scan QR and do DecoderMpm.decode(qrdata, MerchantPresentedMode.class)
  3. Error exception

Expected behavior
No exception error after called this DecoderMpm.decode(qrdata, MerchantPresentedMode.class)

Desktop (please complete the following information):

  • OS: Android
  • Version 7+

Smartphone (please complete the following information):

  • Device: Huawei Mate 20
  • OS: Android
  • Version 10

Additional context
gradle implementation:
implementation('com.github.mvallim:emv-qrcode:0.1.1') { exclude group: 'org.aspectj' }

buildTypes {
     release {
         debuggable false
         minifyEnabled true
         shrinkResources false
         proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
         signingConfig signingConfigs.release
     }
 }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.