ZATCA’s /compliance/invoices
API does not match the hash they calculate from the Base64-decoded invoice
array:3 [
“status” => 400
“message” => “”"
Client error: POST https://gw-fatoora.zatca.gov.sa/e-invoicing/developer-portal/compliance/invoices
resulted in a 400 Bad Request
response:
{“validationResults”:{“infoMessages”:[{“type”:“INFO”,“code”:“XSD_ZATCA_VALID”,“category”:“XSD validation”,“message”:“Com (truncated…)
“””
“body” => “{“validationResults”:{“infoMessages”:[{“type”:“INFO”,“code”:“XSD_ZATCA_VALID”,“category”:“XSD validation”,“message”:“Complied with UBL 2.1 standards in line with ZATCA specifications”,“status”:“PASS”}],“warningMessages”:,“errorMessages”:[{“type”:“ERROR”,“code”:“invalid-invoice-hash”,“category”:“INVOICE_HASHING_ERRORS”,“message”:“The invoice hash API body does not match the (calculated) Hash of the XML”,“status”:“ERROR”}],“status”:“ERROR”},“reportingStatus”:null,“clearanceStatus”:“NOT_CLEARED”,“qrSellertStatus”:null,“qrBuyertStatus”:null}”
]
how to solve the proplem
Technology used PHP