mvallim / emv-qrcode

Java Based EMV QR Code Generator and Parser (MPM, CPM)
https://mvallim.github.io/emv-qrcode/
Apache License 2.0
95 stars 46 forks source link

Scope: 'AdditionalDataField' invalid '00' tag #29

Closed sabrirauf closed 1 year ago

sabrirauf commented 1 year ago

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

mvallim commented 1 year ago

Hi @sabrirauf ,

In the documentation of EMVCo, there is no exists tag '00' in Data Objects for Additional Data Field Template (ID "62").

Name ID Format Length Presence
Bill Number "01" ans var. up to "25" O
Mobile Number "02" ans var. up to "25" O
Store Label "03" ans var. up to "25" O
Loyalty Number "04" ans var. up to "25" O
Reference Label "05" ans var. up to "25" O
Customer Label "06" ans var. up to "25" O
Terminal Label "07" ans var. up to "25" O
Purpose of Transaction "08" ans var. up to "25" O
Additional Consumer Data Request "09" ans var. up to "03" O
RFU for EMVCo "10"-"49" S O
Payment System specific templates. "50"-"99" S O

Ref: Data Objects for Additional Data Field Template (ID "62") page 22

I checked your data and the '00' tag is not valid, following the official EMVCo documentation.

209610098-f7ecb662-2021-40c0-8b47-9a8cc5d41ce1

Thank you for using, and report question.