oxygensuite/digital-client-list
Composer 安装命令:
composer require oxygensuite/digital-client-list
包简介
A PHP package for managing the Digital Client List (DCL) by AADE (IARP) in Greece.
README 文档
README
A comprehensive package for seamlessly interacting with Greece's Digital Client List (DCL) system, enabling automated submissions.
Description
This PHP package provides a simple and efficient way to interact with the Digital Client List (DCL) system in Greece. It allows you to create, update, correlate, and cancel digital clients in compliance with the AADE (Independent Authority for Public Revenue) requirements.
Documentation
- myDATA webpage: AADE myDATA
- DCL documentation (PDF): AADE DCL REST API v1.1
Requirements
To use this package, you will need first a aade id and a Subscription key. You can get these credentials by signing up to myDATA rest api.
- Development: Sign up to myDATA development api
- Production: Sign up to myDATA production api
- PHP 8.1 or higher
- ext-dom extension
- GuzzleHttp 7.9 or higher
| Version | PHP | myDATA | Support |
|---|---|---|---|
| ^v2.x | 8.1 | v1.1.0 | Active |
| ^v1.x | 8.1 | v1.0.0 | Ended |
Installation
You can install the package via composer:
composer require oxygensuite/digital-client-list
Usage
Initialization
Before using any functionality, you need to initialize the DCL client with your credentials:
use OxygenSuite\DigitalClient\Http\DCLRequest; // Initialize with your credentials $env = 'dev'; // 'production' for production environment $userId = 'your-user-id'; $subscriptionKey = 'your-subscription-key'; DCLRequest::init($userId, $subscriptionKey, $env);
Create a Digital Client
To create a new digital client:
use OxygenSuite\DigitalClient\Enums\ClientServiceType; use OxygenSuite\DigitalClient\Http\SendClient; use OxygenSuite\DigitalClient\Models\DigitalClient; use OxygenSuite\DigitalClient\Models\Workshop; // Create a new digital client $dcl = DigitalClient::create() ->setClientServiceType(ClientServiceType::WORKSHOP) ->setBranch(1) ->setComments('Your comments here') ->setUseCase( (new Workshop()) ->setVehicleRegistrationNumber('REGISTRATION_NUMBER') ->setVehicleCategory('CATEGORY') ->setVehicleFactory('FACTORY'), ); // Send the client to DCL $request = new SendClient(); try { $responses = $request->handle($dcl); foreach ($responses as $response) { if ($response->isSuccessful()) { // Get the new client DCL ID $dclId = $response->getNewClientDclID(); // Process successful response } else { // Handle errors foreach ($response->getErrors() as $error) { // Process error } } } } catch (DCLException $e) { // Handle communication error echo "Communication error: " . $e->getMessage(); }
Update a Digital Client
To update an existing digital client:
use OxygenSuite\DigitalClient\Enums\ClientServiceType; use OxygenSuite\DigitalClient\Enums\InvoiceType; use OxygenSuite\DigitalClient\Enums\ProvidedCategoryServiceType; use OxygenSuite\DigitalClient\Http\UpdateClient; use OxygenSuite\DigitalClient\Models\DigitalClient; // Update an existing digital client $updateClient = DigitalClient::update() ->setInitialDclId('your-dcl-id') ->setClientServiceType(ClientServiceType::WORKSHOP) ->setEntryCompletion(true) ->setAmount(150.25) ->setIsDiffVehReturnLocation(false) ->setProvidedServiceCategory(ProvidedCategoryServiceType::WORK_WITH_PARTS) ->setInvoiceKind(InvoiceType::RETAIL) ->setComments('Update comments'); // Send the update request $request = new UpdateClient(); try { $responses = $request->handle($updateClient); foreach ($responses as $response) { if ($response->isSuccessful()) { // Get the updated client DCL ID $updatedDclId = $response->getUpdatedClientDclID(); // Process successful response } else { // Handle errors foreach ($response->getErrors() as $error) { // Process error } } } } catch (DCLException $e) { // Handle communication error echo "Communication error: " . $e->getMessage(); }
Correlate a Digital Client with an invoice
To correlate a digital client with another entity:
use OxygenSuite\DigitalClient\Http\ClientCorrelations; use OxygenSuite\DigitalClient\Models\ClientCorrelation; // Create a correlation $correlateClient = (new ClientCorrelation()) ->setMark('your-mark-number') ->addCorrelatedDCLid('your-dcl-id'); // Send the correlation request $request = new ClientCorrelations(); try { $responses = $request->handle($correlateClient); if ($responses->isSuccessful()) { // Process successful response $correlateId = $response->getClientCorrelationId(); } else { // Handle errors } } catch (DCLException $e) { // Handle communication error echo "Communication error: " . $e->getMessage(); }
Cancel a Digital Client
To cancel a digital client:
use OxygenSuite\DigitalClient\Http\CancelClient; // Create a cancel request $request = new CancelClient(); try { $responses = $request->handle('your-dcl-id'); $response = $responses->first(); //There is only one response if ($response->isSuccessful()) { // Get the cancellation ID $cancellationId = $response->getCancellationID(); // Process successful response } else { // Handle errors foreach ($response->getErrors() as $error) { // Process error } } } catch (DCLException $e) { // Handle communication error echo "Communication error: " . $e->getMessage(); }
Retrieve Digital Clients
To retrieve sent data:
use OxygenSuite\DigitalClient\Http\RequestClients; $request = new RequestClients(); try { $response = $request->handle(100000000028013); print_r($response->toArray()); } catch (DCLException $e) { echo $e->getMessage(); }
Available methods
| Method | Availability |
|---|---|
| SendClient - New Digital Client List registration | ✅ |
| UpdateClient - Change a Digital Client List Registration | ✅ |
| CancelClient - Cancel a Digital Client List registration | ✅ |
| ClientCorrelations - Correlate a Digital Client List Registration(s) with Tax Document | ✅ |
| RequestClients - Retrieve transmitted registrations | ✅ |
Upgrading
When upgrading from v1.x to v2.x, please be aware of breaking changes. The most significant change is in the ClientServiceType enum, where LEASING has been renamed to RENTAL.
For detailed upgrade instructions, please refer to the UPGRADE.md file.
Special Thanks
This package was inspired by the excellent work done in the firebed/aade-mydata package. I would like to express my gratitude to the developers of that project, as some of the core code and concepts from their implementation have been adapted and utilized in this package.
License
This package is open-sourced software licensed under the MIT license.
oxygensuite/digital-client-list 适用场景与选型建议
oxygensuite/digital-client-list 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 136 次下载、GitHub Stars 达 14, 最近一次更新时间为 2025 年 05 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「aade」 「myDATA」 「ΑΑΔΕ」 「dcl」 「digital client list」 「Ψηφιακ�」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 oxygensuite/digital-client-list 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 oxygensuite/digital-client-list 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 oxygensuite/digital-client-list 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
统计信息
- 总下载量: 136
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 14
- 点击次数: 19
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-05-18