kubinyete/adiq-edi-php
最新稳定版本:1.0.2
Composer 安装命令:
composer require kubinyete/adiq-edi-php
包简介
Unofficial library for reading EDI files provided by Adiq.
README 文档
README
pt-BR: Uma biblioteca simples e direta para carregar arquivos EDI da adquirente Adiq Pagamentos
en-US: A straightfoward library for loading EDI files from Adiq Pagamentos
NOTA: Este guia está primariamente em inglês, caso haja necessidade, será adicionado uma versão em pt-BR no futuro.
Installation
Let's start by requiring the package by running the following command
composer require kubinyete/adiq-edi-php
Usage
You can just instantiate a new document object from a data stream, after that, you should be able to directly check each envelope that is present on file, and iterate over each entry accordingly.
// Opening the document by providing a file path $document = Document::open(__DIR__ . DIRECTORY_SEPARATOR . 'EDI_020_20231001_11111_0011_001111111_000111.txt'); // Metadata information can be found via $metadata = $document->getMetadata(); dump([ 'fileVersion' => $metadata->version, 'fileDate' => $metadata->date, 'movement' => $metadata->movement, 'acquirerName' => $metadata->acquirer, 'establishmentCode' => $metadata->establishmentCode, ]); // For each envelope available foreach ($document->getEnvelopes() as $envelope) { /** @var Envelope $envelope */ dump([ 'envelopeDate' => $envelope->date, 'envelopeCurrencyCode' => $envelope->currencyCode, 'entriesCount' => $envelope->registryTotalCount, 'entriesCreditSum' => $envelope->registryTotalCreditAmount, ]); // For each entry (CV, AJ, CC) inside our envelope. foreach ($envelope->getEntries() as $entry) { /** @var EDIRegistry $entry */ dump($registry); } }
统计信息
- 总下载量: 17
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-10-11