stev/lista-firme-bundle

Lista Firme 罗马尼亚 API 的 Symfony 2 扩展包

安装次数: 271

依赖者: 0

建议者: 0

安全: 0

星级: 5

关注者: 4

分支: 0

公开问题: 0

类型:symfony-bundle

v4.0 2024-09-16 11:37 UTC

README

Lista Firme API 的 Symfony 2 扩展包,用于财政部的 openAPI.ro

!!! 从 2016 年 9 月 15 日起,您需要 openAPI 的 apiKey。有关详细信息,请注册 openapi.ro

如果您使用 OpenAPI 并且超出查询限制,将自动使用旧版!

1. 安装

将以下内容添加到 composer.json


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

在 app/AppKernel.php 中添加以下内容


new Stev\ListaFirmeBundle\StevListaFirmeBundle()

在 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

cifChecker 的可能选项为 listaFirme、mFin、openApi 和 anaf。

如果您想使用财政部 API,必须在 composer.json 中添加以下内容


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

2. 使用


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

Lista Firme API 文档可在 http://www.verificaretva.ro/serviciul_tva_api_web_service.htm 找到

财政部 API 可在 http://www.mfinante.ro/agenticod.html 找到

OpenAPI 文档可在 http://openapi.ro/#company 找到

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