We are facing an issue with B2C Invoice validation with ZATCA SDK 3.3.0
The Signing process done by latest SDK but i am getting the following error message when Validate it ZATCA SDK Offline
“[Error] CODE: xadesSignedPropertiesDigestValue, MESSAGE: wrong xadesSignedPropertiesDigestValue”
But When I test the same XML File on ZATCA Web Validator. i am getting multiple error message as attached.
I am doing the following process.
Generate the XML with ZATCA Requirement
Sign the XML with New SDK 3.3.0
The Signed XML get from Signing process pass it into Validation process. But validation failed with the above highlighted error message.
@Ankit_Tiwari @Ehab
Did I missed something after signing process? Please guide
@Ankit_Tiwari @Ehab @Andrewmilad7 @kiaziz Waiting for your response. Please guide here
@ad.almusbahi Looking for support here!
@Ankit_Tiwari Waiting for response! appreciate your support here
Hi All,
After working two weeks on the issue, It get resolved by applying following changes in the XML File before validation.
public void SetDigistProperty(string XMLFilePath, string Certificate, string PrivateKey)
{
XmlDocument XMLDoc = new XmlDocument();
XMLDoc.Load(XMLFilePath);
string STR = SharedUtilities.GetNodeInnerXML(XMLDoc, Zatca.EInvoice.SDK.Utilities.ConfigurationManager.ConfigurationManager.SIGNED_PROPERTIES_XPATH).Replace(" />“, “/>”).Replace(”></ds:DigestMethod>“, “/>”);
var SIGNED_Properities = SharedUtilities.EncodeToBase64(SharedUtilities.HashSha256AsString(STR.Replace(”\r", “”)));
SharedUtilities.SetNodeValue(XMLDoc, Zatca.EInvoice.SDK.Utilities.ConfigurationManager.ConfigurationManager.SIGNED_Properities_DIGEST_VALUE_XPATH, SIGNED_Properities);
XMLDoc.Save(XMLFilePath);
}
Please Note:
1: Here I am passing the Singed XML File which having UBL Extensions Tags
2: Forget about the Web Validator in B2C it will give you error anyway but after applying the above changes. Offline and ZATCA API validation got passed without any errors
1 Like
hello any solution for .net48?
i have same problem in B2C invoices only, i got errors
**** [Error] CODE: X509IssuerName, MESSAGE: wrong X509IssuerName
**** [Error] CODE: X509SerialNumber, MESSAGE: wrong X509SerialNumber
but my it’s Reporting without any error or warning
idaoud
November 21, 2024, 6:37am
7
Morning @Kraken007
Thanks for reaching out, Welcome at our community.
Kindly note that this issue was resolve in release SDK 3.3.7
Our recommendation to install the latest version of SDK 3.3.7 and try it.
For any further support, do not hesitate to reach out our support team via the below mail.
SP mail: sp_support@zatca.gov.sa
Thanks,
Ibrahem Daoud.
.
the new error found after using 3.3.7 when im trying to sign process with same code it’s work in 3.3.6
any advice ?
idaoud
November 22, 2024, 11:22am
9
Dear @Kraken007
Thanks for reaching out,
To provide comprehensive support as usual, Can I kindly ask you to mention the steps you followed after using the latest version of SDK, and what are the parameter that you passing to the signing function?
Thanks,
Ibrahem Daoud.