firebed/vat-registry
Composer 安装命令:
composer require firebed/vat-registry
包简介
Business Registry Information Search
README 文档
README
Using this service, legal entities, legal persons, and natural persons with income from business activity can search for basic information in order to verify the tax or professional status of other legal entities, legal persons, or taxpayers/natural persons conducting business activity.
The system provides 3 ways to search for basic business registry information:
- Through the Basic Business Registry Information Search Service
- Through the Business Registry Service (ΓΕ.ΜΗ.)
- Through the VAT Information Exchange System (VIES) Service
Installation
composer require firebed/vat-registry
Through the Basic Business Registry Information Search Service
This service allows searching all Greek VAT numbers. For the search, you will need a username and a password.
Registration process:
- Register with the service using TAXISnet credentials.
- Obtain special access credentials through the Special Credentials Management application.
For more details and registration, visit the Official AADE Page.
After registration, you will have the username and password needed to use the service.
use Firebed\VatRegistry\TaxisNet; use Firebed\VatRegistry\VatException; $username = 'your-username'; $password = 'your-password'; $taxis = new TaxisNet($username, $password); try { $entity = $taxis->handle('094014201'); print_r($entity); } catch (VatException $exception) { echo "Σφάλμα: " . $exception->getMessage(); }
The result of the above call:
Firebed\VatRegistry\VatEntity { +vatNumber: "094014201" +taxAuthorityId: "1159" +taxAuthorityName: "ΦΑΕ ΑΘΗΝΩΝ" +flagDescription: "ΜΗ ΦΠ" +valid: true +validityDescription: "ΕΝΕΡΓΟΣ ΑΦΜ" +firmFlagDescription: "ΕΠΙΤΗΔΕΥΜΑΤΙΑΣ" +legalName: "ΤΡΑΠΕΖΑ ΕΘΝΙΚΗ ΤΗΣ ΕΛΛΑΔΟΣ ΑΝΩΝΥΜΗ ΕΤΑΙΡΕΙΑ" +commerceTitle: "" +legalStatusDescription: "ΑΕ" +street: "ΑΙΟΛΟΥ" +streetNumber: "86" +postcode: "10559" +city: "ΑΘΗΝΑ" +registrationDate: "1900-01-01" +stopDate: "" +normalVat: true +firms: array:2 [ 0 => array:4 [ "code" => "64191204" "description" => "ΥΠΗΡΕΣΙΕΣ ΤΡΑΠΕΖΩΝ" "kind" => "1" "kindDescription" => "ΚΥΡΙΑ" ] 1 => array:4 [ "code" => "66221001" "description" => "ΥΠΗΡΕΣΙΕΣ ΑΣΦΑΛΙΣΤΙΚΟΥ ΠΡΑΚΤΟΡΑ ΚΑΙ ΑΣΦΑΛΙΣΤΙΚΟΥ ΣΥΜΒΟΥΛΟΥ" "kind" => "2" "kindDescription" => "ΔΕΥΤΕΡΕΥΟΥΣΑ" ] ] }
Check Natural Person / Company
$entity->isNaturalPerson(); $entity->isCompany();
Check Activity Status
// Returns true if the business is active // Returns false if the business has been discontinued $entity->isActive();
If the VAT number is not valid, a null value is returned. If there was another issue, the VatException will contain the relevant error message.
Through the Business Registry Service (ΓΕ.ΜΗ.)
This service allows searching all VAT numbers registered in the General Commercial Registry (ΓΕ.ΜΗ.). The Business Portal API requires an API key. You can request an API key by registering at https://opendata.businessportal.gr/register/ and following the instructions to obtain an API key for the Open Data API.
- Official Swagger documentation: https://opendata-api.businessportal.gr/opendata/docs/
- Technical details about the API: https://opendata.businessportal.gr/techdocs/
Before processing the request to the Business Portal API, this package will first check if the provided VAT number is valid, according to the Greek VAT number format. In case the VAT number is invalid, an InvalidTinException will be thrown.
use Firebed\VatRegistry\BusinessPortal\BusinessPortal; $portal = new BusinessPortal('your-api-key'); // Search by company TIN $response = $portal->searchCompany('094014201'); // Search by company registration number (ΓΕ.Ε.Μ.) $response = $portal->showCompany('000237954001'); var_dump($response);
Through the VAT Information Exchange System (VIES) Service
Using the VIES Service, you can verify the validity of a VAT number issued by any member state of the European Union. The details it provides are more limited compared to the AADE service.
The service is provided free of charge without registration with any entity. It accepts 2 parameters:
- The country code (e.g., EL for Greece)
- The VAT number you want to verify.
use Firebed\VatRegistry\VIES; use Firebed\VatRegistry\VatException; $taxis = new VIES(); try { $entity = $taxis->handle('EL', '094014201'); print_r($entity); } catch (VatException $exception) { echo "Σφάλμα: " . $exception->getMessage(); }
The result of the above call:
Firebed\VatRegistry\VatEntity { +vatNumber: "094014201" +taxAuthorityId: null +taxAuthorityName: null +flagDescription: null +valid: true +validityDescription: null +firmflagDescription: null +legalName: "ΤΡΑΠΕΖΑ ΕΘΝΙΚΗ ΤΗΣ ΕΛΛΑΔΟΣ ΑΝΩΝΥΜΗ ΕΤΑΙΡΕΙΑ" +commerceTitle: null +legalStatusDescription: null +street: "ΑΙΟΛΟΥ" +streetNumber: "86" +postcode: "10559" +city: "ΑΘΗΝΑ" +registrationDate: null +stopDate: null +normalVat: null +firms: [] }
If the VAT number is not valid, the service returns null.
firebed/vat-registry 适用场景与选型建议
firebed/vat-registry 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.68k 次下载、GitHub Stars 达 22, 最近一次更新时间为 2024 年 06 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「Αναζήτηση ΑΦΜ」 「ΑΦΜ」 「Μητώο ΑΦΜ」 「VAT Search」 「VAT Registry」 「Business Registry」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 firebed/vat-registry 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 firebed/vat-registry 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 1.68k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 22
- 点击次数: 22
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-06-02