diff --git a/jpos/src/main/java/org/jpos/emv/cryptogram/CVN18DataBuilder.java b/jpos/src/main/java/org/jpos/emv/cryptogram/CVN18DataBuilder.java index a7afa712c9..3415e4ce1e 100644 --- a/jpos/src/main/java/org/jpos/emv/cryptogram/CVN18DataBuilder.java +++ b/jpos/src/main/java/org/jpos/emv/cryptogram/CVN18DataBuilder.java @@ -50,6 +50,6 @@ public String buildARQCRequest(TLVList data, IssuerApplicationData iad) { @Override public PaddingMethod getPaddingMethod() { - return PaddingMethod.ISO9797Method1; + return PaddingMethod.ISO9797Method2; } } diff --git a/jpos/src/test/java/org/jpos/emv/cryptogram/CVN10DataBuilderTest.java b/jpos/src/test/java/org/jpos/emv/cryptogram/CVN10DataBuilderTest.java index 495931b1c1..45df5bac57 100644 --- a/jpos/src/test/java/org/jpos/emv/cryptogram/CVN10DataBuilderTest.java +++ b/jpos/src/test/java/org/jpos/emv/cryptogram/CVN10DataBuilderTest.java @@ -55,12 +55,9 @@ void testBuildARQCRequest() { "00000000010000000000000008400000000000084018123101ABCDEF101800000203000000", builder.buildARQCRequest(data, iad) ); - assertEquals( "00000000010000000000000008400000000000084018123101ABCDEF101800000203000000000000", builder.buildARQCRequest_padded(data, iad) ); - - } } diff --git a/jpos/src/test/java/org/jpos/emv/cryptogram/CVN18DataBuilderTest.java b/jpos/src/test/java/org/jpos/emv/cryptogram/CVN18DataBuilderTest.java index 10a4e19def..7e81b9bc47 100644 --- a/jpos/src/test/java/org/jpos/emv/cryptogram/CVN18DataBuilderTest.java +++ b/jpos/src/test/java/org/jpos/emv/cryptogram/CVN18DataBuilderTest.java @@ -55,12 +55,9 @@ void testBuildARQCRequest() { "00000000010000000000000008400000000000084018123101ABCDEF101800000106011203000000", builder.buildARQCRequest(data, iad) ); - assertEquals( - "00000000010000000000000008400000000000084018123101ABCDEF101800000106011203000000", + "00000000010000000000000008400000000000084018123101ABCDEF1018000001060112030000008000000000000000", builder.buildARQCRequest_padded(data, iad) ); - - } } diff --git a/jpos/src/test/java/org/jpos/emv/cryptogram/CVN22DataBuilderTest.java b/jpos/src/test/java/org/jpos/emv/cryptogram/CVN22DataBuilderTest.java index 3266b91824..38b2e77dab 100644 --- a/jpos/src/test/java/org/jpos/emv/cryptogram/CVN22DataBuilderTest.java +++ b/jpos/src/test/java/org/jpos/emv/cryptogram/CVN22DataBuilderTest.java @@ -55,5 +55,9 @@ void testBuildARQCRequest() { "00000000010000000000000008400000000000084018123101ABCDEF10180000011F22010300000000000000000000000000000000000000000000000000000000", builder.buildARQCRequest(data, iad) ); + assertEquals( + "00000000010000000000000008400000000000084018123101ABCDEF10180000011F2201030000000000000000000000000000000000000000000000000000000080000000000000", + builder.buildARQCRequest_padded(data, iad) + ); } } diff --git a/jpos/src/test/java/org/jpos/emv/cryptogram/CVNCPADataBuilderTest.java b/jpos/src/test/java/org/jpos/emv/cryptogram/CVNCPADataBuilderTest.java index 5314e0f6bc..622332da45 100644 --- a/jpos/src/test/java/org/jpos/emv/cryptogram/CVNCPADataBuilderTest.java +++ b/jpos/src/test/java/org/jpos/emv/cryptogram/CVNCPADataBuilderTest.java @@ -34,7 +34,6 @@ void testBuildARQCRequest() { "0000000100000000000010000840000000108008409807040011111111580034560FA500A03800000000000000000000000F010000000000000000000000000000", builder.buildARQCRequest(data, iad) ); - assertEquals( "0000000100000000000010000840000000108008409807040011111111580034560FA500A03800000000000000000000000F01000000000000000000000000000080000000000000", builder.buildARQCRequest_padded(data, iad) diff --git a/jpos/src/test/java/org/jpos/emv/cryptogram/CVNMCDataBuilderTest.java b/jpos/src/test/java/org/jpos/emv/cryptogram/CVNMCDataBuilderTest.java index 427ce5a943..03ff660056 100644 --- a/jpos/src/test/java/org/jpos/emv/cryptogram/CVNMCDataBuilderTest.java +++ b/jpos/src/test/java/org/jpos/emv/cryptogram/CVNMCDataBuilderTest.java @@ -53,8 +53,10 @@ void buildARPCRequest() { "000000010000000000001000084000000010800840980704001111111158003456608003220000", builder.buildARQCRequest(data, iad) ); - + assertEquals( + "00000001000000000000100008400000001080084098070400111111115800345660800322000080", + builder.buildARQCRequest_padded(data, iad) + ); } - }