I want to use .NET SDK on linux, because I will send the invoices for multilple merchants, so that I used the .NET SDK not JAVA.
But I’m facing an issue when run the DLL file, I’m using 3.3.8 version:
$ dotnet /zatca-einvoicing-sdk-238-R3.3.8/Lib/Dot-Net8/Test/fatooraNet.dll sign -invoice “399999999900003_20241203T113812_2024-12-03-1082.xml” -privateKey “PrivateKey.pem” -certificate “cert.pem” -signedInvoice “signed_399999999900003_20241203T113812_2024-12-03-1082.xml”
********************* Welcome to ZATCA E-Invoice .Net SDK 3.3.8 *********************
This App uses .Net to call the SDK passing it an invoice XML file.
It can take a Standard or Simplified XML, Credit Note, or Debit Note.
It returns if the validation is successful or shows errors where the XML validation fails.
It checks for syntax and content as well.
You can use the command (fatooraNet -help) for more information.
You can use the command (fatooraNet {Command} -help) for instructions on how to use the command and expected arguments.
Thanks for reaching out, welcome to our community.
Can I kindly ask you to share all the steps that you are followed, and If you provide screen shout this will be helpful for our investigation, to provide a comprehensive support as usual.
yes sure, here are the steps:
1- create CSR:
env(“ZATCA_SDK”) . " csr -csrConfig "$configPath" -privateKey "$privateKey" -generatedCsr "$csrPath""
2- send the otp and csr to /compliance
and get the result and store it
3- send the complience_request_id with secret and security token to /production/csids
get the result and store it inside cert.pem
4- create the XML from invoice and try to sign it using
env(“ZATCA_SDK”) . " sign -invoice "$xmlInvoicePath" -privateKey "$privateKey" -certificate "$certificate" -signedInvoice "$signedInvoice""
everything is working locally (windows) with .exe but in the server (linux) with dll the error appers
Can I kindly ask you to reach out to your RM and share the full concerns with screenshot via below SP mail, to have better investigations and schedule meeting if needed?
We have online solution, and we have already customers in KSA who are using our system for phase 1 and we want to prepare our system to comply with ZATCA phase 2 for their future needs.
Kindly advice.
Well, As you mentioned previously that it work in windows, are you followed the exact same steps?
One more thing, Did you execute the install.net.sh inside SDK (zatca-einvoicing-sdk-238-R3.3.8\Lib\Dot-Net8)
Additionally, what is the exact command that you are using to sign the invoice?
Can you try the below command to sign the invoice:
fatooranet sign -invoice “invoice.xml”
Additionally, ensure that you are using the command from the same directory where your invoice saved, and you have your PCSID token decoded base64 in the cert.pem file inside the SDK.
I tried with fatooraNet command it’s not working the command not found.
But I tried with this:
dotnet /home/server/zatca-einvoicing-sdk-238-R3.3.8/Lib/Dot-Net8/Test/fatooraNet.dll sign -invoice “Simplified_Invoice.xml” -certificate …/…/…/Certificates/cert.pem -privateKey …/…/…/Certificates/ec-secp256k1-priv-key.pem