ALsalam Alykum, Hello,
everything is working ( almost ) except the SignedProperties,
I get a different hashing key, because of the spaces
In your Simplified invoice xml, you are putting ubl:Extensions in same level as the invoice tag
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"><ext:UBLExtensions>
...
..
.
Where is in my code, the ubl:extensions is inside the invoice
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2">
<ext:UBLExtensions>
and because of that, my SignedProperties got an extra 4 spaces,
my question is, does that matter ? will it effect the hash ?
does that why i get an errors:
2025-07-26 19:41:38,828 [INFO] ValidationProcessorImpl - [QR] validation result : FAILED
2025-07-26 19:41:38,830 [ERROR] ValidationProcessorImpl - qr validation errors :
2025-07-26 19:41:38,830 [ERROR] ValidationProcessorImpl - CODE : QRCODE_INVALID, MESSAGE : Invalid QR code format, Please follow the ZATCA QR code specifications
2025-07-26 19:41:39,206 [INFO] ValidationProcessorImpl - [SIGNATURE] validation result : FAILED
2025-07-26 19:41:39,206 [ERROR] ValidationProcessorImpl - signature validation errors :
2025-07-26 19:41:39,207 [ERROR] ValidationProcessorImpl - CODE : X509IssuerName, MESSAGE : wrong X509IssuerName
2025-07-26 19:41:39,207 [ERROR] ValidationProcessorImpl - CODE : X509SerialNumber, MESSAGE : wrong X509SerialNumber
2025-07-26 19:41:39,207 [ERROR] ValidationProcessorImpl - CODE : signingCertificateDigestValue, MESSAGE : wrong signingCertificateDigestValue
2025-07-26 19:41:39,210 [INFO] ValidationProcessorImpl - [PIH] validation result : PASSED
2025-07-26 19:41:39,210 [INFO] InvoiceValidationService - *** GLOBAL VALIDATION RESULT = FAILED
I’m sure if the issuerName and serialNumber, because i decoded everything and extracted it ( dynamic )
Thank you.