stev/lista-firme-bundle

Symfony 2 Bundle for Lista Firme Romanian API

Installs: 291

Dependents: 0

Suggesters: 0

Security: 0

Stars: 6

Watchers: 4

Forks: 0

Open Issues: 0

Type:symfony-bundle

v4.1 2024-12-12 12:22 UTC

README

Symfony 2 Bundle for Lista Firme API, Ministerul de Finante, si openAPI.ro

!!! Din 15.09.2016 este necesar sa aveti un apiKey pentru openAPI. Pentru detalii inregistrati-va pe openapi.ro

Daca folositi OpenAPI si cumva se depaseste limita de interogari se va folosi automat varianta legacy!

1. Installation:

Add this to composer.json


"stev/lista-firme-bundle": "2.0"

Add this in app/AppKernel.php


new Stev\ListaFirmeBundle\StevListaFirmeBundle()

Add this in app/config.yml


stev_lista_firme:
    cifChecker: mFin/anaf/openApi/listaFirme
    username: demo
    password: demo
    offline: false
    enabled: yes
    #pathToPhantom is needed if you choose mFin as cifChecker
    pathToPhantom: path/to/bin/phantomjs'
    #apiKey is needed only if you work with open starting from 15.09.2016
    apiKey: your-api-key

Possible options for cifChecker are listaFirme, mFin, openApi and anaf.

If you want to use Finance Ministry API you must add this to your composer.json


"post-install-cmd": [
    "PhantomInstaller\\Installer::installPhantomJS"
],
"post-update-cmd": [
    "PhantomInstaller\\Installer::installPhantomJS"
],

2. Usage


/* @var $listaFirme \Stev\ListaFirmeBundle\Lib\ListaFirme */
    $listaFirme = $this->get('stev.lista_firme');
    $response = $listaFirme->checkCompanyByCUI($cui);

Lista Firme API documentation can be found at http://www.verificaretva.ro/serviciul_tva_api_web_service.htm

Finance Ministry API can be found http://www.mfinante.ro/agenticod.html

OpenAPI documentation can be found at http://openapi.ro/#company

ANAF API docs https://webservicesp.anaf.ro/PlatitorTvaRest/api/v3/