Hello everyone
I am using the following code to sign invoices , then send to ZATCA for clearance through the following link"https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/precompliance/invoices"
I am working on simulation Environment . the problem is that Standard invoice , Standard_Credit_Note,Standard_Debit_Note are cleared successfully ,
but Simplified_Invoice and its associated documents gives the following error message
“{“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”:“signed-properties-hashing”,“category”:“CERTIFICATE_ERRORS”,“message”:“Invalid signed properties hashing, SignedProperties with id=‘xadesSignedProperties’”,“status”:“ERROR”}],“status”:“ERROR”},“reportingStatus”:“NOT_REPORTED”,“clearanceStatus”:null,“qrSellertStatus”:null,“qrBuyertStatus”:null}”
I am using the SDK invoice samples , I changed the tax payer with real data
the code is like the following
Private Sub SignDocumnet(ByVal document As String)
    Dim privateKey As String
    Dim fileprivateKey As System.IO.StreamReader
    fileprivateKey = My.Computer.FileSystem.OpenTextFileReader("Keys\PrivateKey.txt")
    privateKey = fileprivateKey.ReadToEnd
    fileprivateKey.Close()
    Dim certificateContent As String
    Dim filecertificateContent As System.IO.StreamReader
    filecertificateContent = My.Computer.FileSystem.OpenTextFileReader("Keys\CSID.txt")
    certificateContent = filecertificateContent.ReadToEnd
    filecertificateContent.Close()
    Dim XmlDoc As New XmlDocument
    Dim fileReader As String
    fileReader = My.Computer.FileSystem.ReadAllText("invoices\" & document)
    XmlDoc.LoadXml(fileReader)
    Dim ObjEInvoiceSigner As New Zatca.EInvoice.SDK.EInvoiceSigner
    Dim ObjSignResult As New SDK.Contracts.Models.SignResult
    Dim data() As Byte = System.Convert.FromBase64String(certificateContent)
    Dim cert As String = System.Text.ASCIIEncoding.ASCII.GetString(data)
    Dim obj As New SDKNETFrameWorkLib.BLL.EInvoiceSigningLogic
    ObjSignResult = ObjEInvoiceSigner.SignDocument(XmlDoc, cert, privateKey)
    Dim SignedDocument As XmlDocument = ObjSignResult.SignedEInvoice
    invoiceString = SignedDocument.InnerXml.ToString()
    Dim file As System.IO.StreamWriter
    file = My.Computer.FileSystem.OpenTextFileWriter("Invoices\Signed\" & document, True)
    file.Write(invoiceString)
    file.Close()
End Sub