-2

The QR code fields shall be encoded in Tag-Length-Value (TLV) format with the tag values specified in the “Tag” column of the adjacent table in the image below.

The TLV encoding shall be as follows:

Tag: the tag value as mentioned above is stored in one byte Length: the length of the byte array resulted from the UTF8 encoding of the field value. The length shall be stored in one byte. Value: the byte array resulting from the UTF8 encoding of the field value.

This image describe my problem:

Mike 'Pomax' Kamermans
  • 49,297
  • 16
  • 112
  • 153
  • 1
    We don't need that image as long as you describe things well enough in your post. On that note: look at your post after you submit it because it needs to follow [the posting guidelines](/help/how-to-ask), and definitely needs to use [the correct formatting](/markdown). With that said: what's your actual problem? Nothing in your post talks about what you've written so far, and where you got stuck in that process, so there isn't anything [for SO to help you with](/help/on-topic) yet? – Mike 'Pomax' Kamermans Nov 15 '21 at 17:47

1 Answers1

2

You can generate the required hashes by using this library here.

String qrBarcodeHash = QRBarcodeEncoder.encode(
    new Seller("شركة تجريبية"),
    new TaxNumber("312345678901233"),
    new InvoiceDate("2021-11-18T18:40:34+03:00"),
    new InvoiceTotalAmount("2.30"),
    new InvoiceTaxAmount("0.30")
);
Bu Saeed
  • 1,173
  • 1
  • 16
  • 27