@Support-at-ERPgulf hello guys, first need to thank you for your efforts to the community , second i need you if you can to explain how the pih created please , i created the Csr and Private key , and need to know if the public key should created or not please ?? , and thanks in advance.
Use this format
{“data”: [{“company”: “ABBR”, “pih”: “QdsFjxXtySaaZzk11h/Xj1m258XigIGF6vZ6appyS8Q=”}]}
Use this format for PIH
{“data”: [{“company”: “ABBR”, “pih”: “QdsFjxXtySaaZzk11h/Xj1m258XigIGF6vZ6appyS8Q=”}]}
@Support-at-ERPgulf okay , so in my case i will change the “abbr” only and use the rest of format ???
is PIH is required for generating ccid and how generate PIH
PIH for first invoice “0” value encoded to base64. On setting page you give this if your device submitting first invoice. Otherwise PIH of last invoice whenever you submitted.
from the next invoice, PIH is the hash of previous invoice. System takes it from setting page and update it with each invoice.
Make sure you have ABBR in company doc, and your JSON for PIH having same ABBR in the structure.
yes .it is same
When i was enter OTP by selecting Simulation it is showing “OTP is invalid” but when i select Sandbox it is working but it is working with wrong otp also.
please can you explain why it is accepting wrong otp.
Sandbox does not validate OTP. SIimulation and Production does
@Support-at-ERPgulf i created the CSR data successfully like the format you tell me it should be , and use simulation to create the certification or CSID by using OTP , and it give me that msg
@Support-at-ERPgulf I am facing same issue as above screenshot . Is there any prezatca code siging to add in csr.Please refer below screenshot received from zatca
@Support-at-ERPgulf hello guys , happy aid for you all , if there is any solution for this issue , because we all face the same issue in the thread , thanks in advance .
We found an issue on CSR validation with a certain set of VAT numbers. Our team trying to fix it. Will update here asap
Pushed a bug-fix for CSR . Pls update.
Pushed bug-fixes ( Correctred OID on CSR ) . please pull / update.
Lets know if anyone face any more issues.
If you get this error -
Failed to get method for command zatca_erpgulf.zatca_erpgulf.sign_invoice.create_csr with cannot import name ‘NameOID’ from ‘cryptography.hazmat._oid’ (/home/frappe/frappe-bench/env/lib/python3.8/site-packages/cryptography/hazmat/_oid.py)
Upgrade cryptography libraries with following command
env/bin/pip3 install pyOpenSSL --upgrade
If the above not working try this.
pip uninstall pyopenssl
pip uninstall cryptography
pip install pyopenssl
pip install cryptography
Error:
Failed to get method for command zatca_erpgulf.zatca_erpgulf.sign_invoice.create_csr with module ‘cryptography.utils’ has no attribute ‘Enum’
Upgrade cryptography libraries with following command
env/bin/pip3 install pyOpenSSL --upgrade
If the above not working try this.
pip uninstall pyopenssl
pip uninstall cryptography
pip install pyopenssl
pip install cryptography