定制 iggi/aade-afm 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

iggi/aade-afm

最新稳定版本:v2.1.1

Composer 安装命令:

composer require iggi/aade-afm

包简介

Info about a registered business Tax ID (AFM)

README 文档

README

Uses the Official Online Service for Basic Data for Legal Entities

Installation

Install the latest version with

$ composer require iggi/aade-afm

Instructions on how to obtain a username and password

Your regular Taxisnet username - password will not work. You should follow the instructions at:

https://www.aade.gr/epiheiriseis/forologikes-ypiresies/mitroo/anazitisi-basikon-stoiheion-mitrooy-epiheiriseon

Basic Usage

<?php
require_once "vendor/autoload.php";

use Iggi\AadeAfm;
use Dotenv\Dotenv;
// Dotenv is not actually a prerequisite, but is recommended
$dotenv = Dotenv::createImmutable(dirname(__DIR__));
$dotenv->load();

$username = $_ENV["AADE_USERNAME"]; // username can be obtained from https://www.aade.gr/epiheiriseis/forologikes-ypiresies/mitroo/anazitisi-basikon-stoiheion-mitrooy-epiheiriseon
$password = $_ENV["AADE_PASSWORD"]; // password
$authorisedCallerAfm = $_ENV["AADE_AUTH"]; // optional if same with the caller's afm but if present must be authorised
$afm = $_ENV["AFM"]; // AFM to search

$api = new AadeAfm($username, $password, $authorisedCallerAfm);
// You may check the API version
// $data = $api->version();

// You may check the validity of the AFM (boolean)
// $valid = $api->validate($afm);

// You may retrieve the AFM information
$data = $api->info($afm);
echo json_encode($data, JSON_PRETTY_PRINT);
/*
 * Success
{
    "success": true,
    "business": {
        "kad": "XXXXXXXXX",
        "drastiriotita": "XXXXXXXXXXXX",
        "afm": "XXXXXXX",
        "stopDate": "XXXXXXX",
        "postalAddressNo": "XXXXXXX",
        "doyDescr": "XXXXXXX",
        "doy": "XXXXXXX",
        "onomasia": "XXXXXXX",
        "legalStatusDescr": "XXXXXXX",
        "registDate": "XXXXXXX",
        "deactivationFlag": "XXXXXXX",
        "deactivationFlagDescr": "XXXXXXX",
        "postalAddress": "XXXXXXX",
        "firmFlagDescr": "XXXXXXX",
        "commerTitle": null,
        "postalAreaDescription": "XXXXXXX",
        "INiFlagDescr": ""XXXXXXX",
        "postalZipCode": "XXXXXXX",
        "drastiriotites": [
            {
                "type": "1",
                "typeName": "ΚΥΡΙΑ",
                "kad": "XXXXXXXXX",
                "drastiriotita": "XXXXXXXXXXXX"
            },
            {
                "type": "2",
                "typeName": "ΔΕΥΤΕΡΕΥΟΥΣΑ",
                "kad": "XXXXXXXXXXXX",
                "drastiriotita": "XXXXXXXXXXXXXXXXXXXXX"
            }
        ]
    }
}
 * Error
{
    "success": false,
    "reason": "O Α.Φ.Μ. για τον οποίο ζητούνται πληροφορίες δεν ανήκει και δεν ανήκε ποτέ σε νομικό πρόσωπο, νομική οντότητα, ή φυσικό πρόσωπο με εισόδημα από επιχειρηματική δραστηριότητα.",
    "isNotBusiness": true
}

*/

Author

Ignatios Drakoulas - ignatisnb@gmail.com - https://twitter.com/ignatisd

License

AadeAfm is licensed under the MIT License - see the LICENSE file for details

统计信息

  • 总下载量: 21.35k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-01-22