BIC (Biroul Istoriilor de Credit) bicr.md
Reporting API Implementation
- Generate BIC XML
- Sign XML at itsec.md
- Receive signed XML
- Send xml & signature to BIC to receive company report
Understanding logic , core
applications/reports/process
Check ProcessService for better understanding
applications/reports/process/__init__.py
- Python 3.8
Before running this project you should have certificates from bicr.md
and signing domain from itsec.md
, at the moment those are:
1.pem (CHAIN)
2.pem (CA)
3.pem (KEY)
private.pem (user certificate)
Setup .env:
cp .env.example .env
SERVICE_BIC_HOST=http://sigun.bicr.md/api/bulkReport2/
SERVICE_BIC_USERNAME=test
SERVICE_BIC_PASSWORD=test
SERVICE_SIGNATURE_HOST=
SERVICE_SIGNATURE_CERTIFICATES=certificates
SERVICE_SIGNATURE_TEMPLATES=templates
SERVICE_SIGNATURE_PRIVATES=privates
Replace 1.pem , 2.pem , 3.pem , privat.pem under certificates & privates folder
Install dependencies
pipenv install
Run migrations
python manage.py migrate
Run server
python manage.py runserver
Place order example
POST http://127.0.0.1:8000/api/orders/
{
"id": 100,
"idno": "2",
"title": "Company"
}
Parse received XML
POST http://127.0.0.1:8000/api/parsers/xml/
{
"idno": "2",
"xml": "<xml/>"
}
Generate parsed XML BIC - PDF
GET http://127.0.0.1:8000/api/parsers/1/