This is a fix for extracting public_key and signature from the signing certificates.
Also switches the order of TLV tags in the QR making the certificate signature bytes be the 8th tag instead of 7th.
ZATCA docs are confusing and mention that the tag should be 7 in one page and 8 in another.
However, from testing this with zatca-xml-js this order along with how the values are extracted is generating a valid signed invoice that passes compliance checks.
This is a fix for extracting
public_key
andsignature
from the signing certificates. Also switches the order of TLV tags in the QR making the certificate signature bytes be the 8th tag instead of 7th.ZATCA docs are confusing and mention that the tag should be 7 in one page and 8 in another. However, from testing this with zatca-xml-js this order along with how the values are extracted is generating a valid signed invoice that passes compliance checks.