-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid signed properties hashing #44
Comments
Can you please share context, what type of invoice, which environment and
if possible generated xml
Also, steps you’ve taken to sign your invoice?
…On Tue, Aug 22, 2023 at 2:52 AM, tawfik ***@***.***> wrote:
Error Invalid signed properties hashing, Signed Properties with
id='xadesSignedProperties' during onboarding
—
Reply to this email directly, view it on GitHub
<#44>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPK2CMNLEHLDPCBAGQCGWTXWPKAFANCNFSM6AAAAAA3Y7QC4Q>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
` $template = "<xades:SignedProperties xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" Id="xadesSignedProperties">
these properties invalid hash the template is invalid this response from zatca api |
@tawwfik Did you able to fix that issue? |
i have same issue can anybody help on it |
I have same issue in simulation mode
|
Hi guys.
|
Sorry to resurrect an old thread, but I'm having the same issue. Could you show exactly what the SignedProperties section looks like just before you hash it, please? I'm still getting "Invalid signed properties hashing" every time. |
@Yottskry @fuadhasni @tawwfik @fawadsaboor @thaifanisalla Issue 1: Inconsistency in E-Invoicing Statistics After successfully integrating and following the official documentation provided by ZATCA, I have encountered an inconsistency in the e-invoicing statistics displayed on the Fatoora portal's simulation section. Despite receiving a "status":"PASS", "reportingStatus": "REPORTED" for submitted simplified invoices via the API endpoint "https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/invoices/reporting/single" and despite receiving a "status": "PASS", "clearanceStatus": "CLEARED" for standard invoices via "https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/invoices/clearance/single", the total count of submitted documents does not reflect accurately on the portal. This issue persists even after multiple checks over several days. Also, if I submitted and got a successful response from the API as the document is accepted and while checking on the Fatoora statistics page sometimes it is counted in rejected documents. Why is this mismatch happening? If I received REPORTED, CLEARED status with no error or warning messages, can I confirm that my document is submitted and accepted by ZATCA successfully? Please clarify this. Issue 2: Lack of Clarity on Tax Amount Calculation Additionally, I seek clarification on the calculation of the total tax amount payable to ZATCA for the submitted and accepted invoice documents. As there is no provision to retrieve this information from the ZATCA side, could you please confirm whether we need to calculate this amount internally based on the submitted invoices? For instance, if five invoices are successfully submitted and accepted, how do we determine the total tax amount owed to ZATCA? Could someone please clarify these doubts? |
@tawwfik |
hello |
I also used the .net SDK and eventually got this working. The problem is that the XML has to be formatted exactly as Zatca expects because they also perform the hash at their end, so if we don't make the same manipulations they make they will get a different hash to us. The steps I followed were:
One last thing is to remove the extra namespaces from the signature block or it won't validate the document correctly at Zatca, and to replace the entire signature block (removed in step 3) with our signature block. docstr is the entire document as a string (xmldoc.OuterXml):
It's a lot of hoops to jump through, and it took me about a week of trial and error to get here. I'm not saying this is the only way of doing this or even the best way, but this is what worked for me. I hope it at least puts you on the right track. |
First of all, I would like to thank you very much for the explanation you provided , |
That's useful to know. We do have those DLL's but they were from an earlier version of the SDK. Perhaps they broke something in the newer versions? I'll have a look at them though, thanks. |
this code for SignedProperties issue it's work with me with php language
$invoice is full invoice without |
@ajaybalachandran |
@tawwfik
|
$invoice is full invoice without |
@tawwfik full invoice including the |
Hey , i'm facing this issue , anybody can help me ,code":"invalid-invoice-hash","category":"INVOICE_HASHING_ERRORS","message":"The invoice hash API body does not match the (calculated) Hash of the XML (PHP) |
i face this issue before , the reason was i didn't encode the xml to UTF8 before converting to base64 , because i'am using Arabic Letters |
can you share me some code example, because hash created from my side is not same like created by sdk.. |
after Signing the XML for invoice ... generate hash by using this :
and i saved the uuid and hash into out system database .... i hope that can help you |
thank you, but still i'm getting same error , do you have any php code example in which you generated hash of invoice from xml |
sorry , but i'am using c# |
Bro how you generated InvoiceHash in php ? |
I am trying to pass Simplified Invoice (B2C) for compliance. But it's giving me following errors:
I am using the same procedure for Standard Invoice(B2B) for compliance and it's working very fine. I am using .Net SDK for implementation. Trying to get a solution for a long time. Please help. |
i was facing these errors before .... the soluation i did is using Old Zatca dll because i'am using .NET like you .... this dll called "SDKNETFrameWorkLib.dll" ... i used this dll for Signing the invoice and "Zatca.EInvoice.SDK.dll" for QR Generating . |
Tried this dll, but hashing function is not working. Code is below: I think this dll doen't have that function. How you are doing the hashing of the xml? |
this for hashing :
|
Tried your solution, but couldn't get it right. Hash is not valid after using your method. can I hash the xml without making it as a string. |
Thank you so much mate <3 |
Will you please provide me some support regarding this I am facing the same Issue I did everything as per the document but I am still getting invoice hashing error.Please help me out errorMessages": array:1 [ I am getting this error in laravel |
Error Invalid signed properties hashing, Signed Properties with id='xadesSignedProperties' during onboarding
The text was updated successfully, but these errors were encountered: