PHPackages                             kubinyete/getnet-edi - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. kubinyete/getnet-edi

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

kubinyete/getnet-edi
====================

A simple yet useful EDI parser for Getnet, a brazillian payment acquirer institution

1.0.5(2y ago)163PHP

Since Apr 22Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Kubinyete/getnet-edi-php)[ Packagist](https://packagist.org/packages/kubinyete/getnet-edi)[ RSS](/packages/kubinyete-getnet-edi/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (6)Versions (7)Used By (0)

[![](https://camo.githubusercontent.com/2621426200057c8b012927ef17c4a5fd16032f8abef43149171718f426fb7f41/68747470733a2f2f736974652e6765746e65742e636f6d2e62722f77702d636f6e74656e742f75706c6f6164732f323032312f30382f6c6f676f2d6765746e65742e706e67)](https://camo.githubusercontent.com/2621426200057c8b012927ef17c4a5fd16032f8abef43149171718f426fb7f41/68747470733a2f2f736974652e6765746e65742e636f6d2e62722f77702d636f6e74656e742f75706c6f6164732f323032312f30382f6c6f676f2d6765746e65742e706e67) **EDI** for PHP
=====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#-edi-for-php)

**pt-BR**: Uma biblioteca simples e direta para carregar arquivos EDI da adquirente [Getnet](https://getnet.com.br/)

**en-US**: A straightfoward library for loading EDI files from [Getnet](https://getnet.com.br/)

***NOTA**: Este guia está primariamente em inglês, caso haja necessidade, será adicionado uma versão em pt-BR no futuro.*

---

### Warning

[](#warning)

This package is still work-in-progress, there are plans for adding better support for document reading by providing indexing and class bindings to directly access those entries, for now we have only provided the basic parser &amp; document wrapper, providing the necessary means for line-by-line sequential reading.

### Installation

[](#installation)

Let's start by requiring the package by running the following command

```
composer require kubinyete/getnet-edi
```

### Usage

[](#usage)

#### Basic line-by-line parsing

[](#basic-line-by-line-parsing)

Provides a basic document class for opening a EDI text-file

```
// Opening a new document (version 10.1)
$document = Kubinyete\Edi\Getnet\Document\Document::open('./sample/getnetextr_20240418_0000000_c101.txt');

// Sequential reading
while ($row = $document->next()) {
    // Current line number that has been read
    $lineNumber = $document->currentLineNumber();
    // Current line contents that has been read
    $lineContent = $document->currentLine();

    // What type/class we got after parsing it.
    $parsedType = get_class($row);

    echo "Current line {$lineNumber}: '{$lineContent}'" . PHP_EOL;
    echo "Parsed content ($parsedType): " . json_encode($row, JSON_PRETTY_PRINT) . PHP_EOL;
    // @NOTE: This is only a sample code for visualizing each entry that has been parsed
}
```

The above code will output:

```
Current line 1: '01804202407321018042024CEADM1000000000        00000000000000GETNET S.A.         000000001GSSANT. V.10.1 400 BYTES                                                                                                                                                                                                                                                                                               '
Parsed content (Kubinyete\Edi\Getnet\Registry\Header): {
    "registryType": 0,
    "fileCreationDate": {
        "date": "2024-04-18 07:32:10.000000",
        "timezone_type": 3,
        "timezone": "America\/Sao_Paulo"
    },
    "movementReferenceDate": {
        "date": "2024-04-18 00:00:00.000000",
        "timezone_type": 3,
        "timezone": "America\/Sao_Paulo"
    },
    "fileVersion": "CEADM100",
    "establishmentCode": "0000000",
    "acquirerDocument": "00000000000000",
    "acquirerName": "GETNET S.A.",
    "sequenceNumber": 1,
    "acquirerCode": "GS",
    "layoutVersion": "SANT. V.10.1 400 BYTES",
    "_padding": ""
}
```

### Type reference

[](#type-reference)

Quick type reference for each registry type and associated baseline version.

We advice only to expect the associated registry interface, and not its defined type, this will prevent any breaking change from affecting your application immediately (Ex: Name changes, value type changes, and so on)

If there are any changes that are not retrocompatible, a new type or associated interface will be used for that functionality.

TypeVersionRegistry typeInterface0&gt;=10.1Kubinyete\\Edi\\Getnet\\Registry\\HeaderHeaderInterface1&gt;=10.1Kubinyete\\Edi\\Getnet\\Registry\\TransactionalSummaryTransactionalSummaryInterface2&gt;=10.1Kubinyete\\Edi\\Getnet\\Registry\\TransactionalAnalyticTransactionalAnalyticInterface3&gt;=10.1Kubinyete\\Edi\\Getnet\\Registry\\FinantialAdjustmentFinantialAdjustmentInterface4---5&gt;=10.1Kubinyete\\Edi\\Getnet\\Registry\\FinantialSummary-6&gt;=10.1Kubinyete\\Edi\\Getnet\\Registry\\FinantialDetail-9&gt;=10.1Kubinyete\\Edi\\Getnet\\Registry\\TrailerTrailerInterface### Registry types

[](#registry-types)

Functionality interfaceSignatureHeaderInterface`getFileCreationDate(): DateTimeInterface`HeaderInterface`getMovementReferenceDate(): DateTimeInterface`HeaderInterface`getFileVersion(): string`HeaderInterface`getEstablishmentCode(): string`HeaderInterface`getAcquirerDocument(): string`HeaderInterface`getAcquirerName(): string`HeaderInterface`getSequenceNumber(): int`HeaderInterface`getAcquirerCode(): string`HeaderInterface`getLayoutVersion(): string`---

Functionality interfaceSignatureTrailerInterface`getRegistryQuantity(): int`---

Functionality interfaceSignatureFinantialAdjustmentInterface`getRegistryType(): int`FinantialAdjustmentInterface`getEstablishmentCode(): string`FinantialAdjustmentInterface`getSalesSummaryNumber(): string`FinantialAdjustmentInterface`getSalesSummaryDate(): DateTimeInterface`FinantialAdjustmentInterface`getSalesSummaryPaymentDate(): DateTimeInterface`FinantialAdjustmentInterface`getAdjustmentId(): string`FinantialAdjustmentInterface`getWhiteSpace(): string`FinantialAdjustmentInterface`getAdjustmentSignal(): string`FinantialAdjustmentInterface`getAdjustmentAmount(): string`FinantialAdjustmentInterface`getAdjustmentReasonCode(): string`FinantialAdjustmentInterface`getLetterDate(): DateTimeInterface`FinantialAdjustmentInterface`getCardNumber(): string`FinantialAdjustmentInterface`getSalesSummaryNumberOriginal(): string`FinantialAdjustmentInterface`getAcquirerNsu(): string`FinantialAdjustmentInterface`getTransactionDateOriginal(): DateTimeInterface`FinantialAdjustmentInterface`getPaymentTypeIndicator(): string`FinantialAdjustmentInterface`getTerminalCodeOriginal(): string`FinantialAdjustmentInterface`getPaymentDateOriginal(): DateTimeInterface`FinantialAdjustmentInterface`getCurrencyCode(): int`FinantialAdjustmentInterface`getSaleComissionAmount(): string`FinantialAdjustmentInterface`getMetadataContentType(): string`FinantialAdjustmentInterface`getMetadata(): string`---

Functionality interfaceSignatureTransactionalSummaryInterface`getRegistryType(): int`TransactionalSummaryInterface`getEstablishmentCode(): string`TransactionalSummaryInterface`getProductCode(): string`TransactionalSummaryInterface`getCaptureSignature(): string`TransactionalSummaryInterface`getSalesSummaryNumber(): string`TransactionalSummaryInterface`getSalesSummaryDate(): DateTimeInterface`TransactionalSummaryInterface`getSalesSummaryPaymentDate(): DateTimeInterface`TransactionalSummaryInterface`getBankCode(): string`TransactionalSummaryInterface`getBankAgency(): string`TransactionalSummaryInterface`getCheckingAccount(): string`TransactionalSummaryInterface`getSalesAcceptedQuantity(): int`TransactionalSummaryInterface`getSalesRejectedQuantity(): int`TransactionalSummaryInterface`getGrossAmount(): string`TransactionalSummaryInterface`getAmount(): string`TransactionalSummaryInterface`getFareAmount(): string`TransactionalSummaryInterface`getDiscountRateAmount(): string`TransactionalSummaryInterface`getTotalRejectedAmount(): string`TransactionalSummaryInterface`getTotalCreditAmount(): string`TransactionalSummaryInterface`getChargesAmount(): string`TransactionalSummaryInterface`getPaymentTypeIndicator(): string`TransactionalSummaryInterface`getSalesSummaryInstallment(): int`TransactionalSummaryInterface`getSalesSummaryInstallments(): int`TransactionalSummaryInterface`getEstablishmentCodeOrigin(): string`TransactionalSummaryInterface`getAnticipationOperationNumber(): string`TransactionalSummaryInterface`getDueDateOriginal(): DateTimeInterface`TransactionalSummaryInterface`getOperationCost(): string`TransactionalSummaryInterface`getSalesSummaryAnticipationAmount(): string`TransactionalSummaryInterface`getChargeControlNumber(): string`TransactionalSummaryInterface`getChargeAmount(): string`TransactionalSummaryInterface`getCompensationId(): string`TransactionalSummaryInterface`getCurrencyCode(): int`TransactionalSummaryInterface`getChargeWriteOffIdentifier(): string`TransactionalSummaryInterface`getTransactionAdjustmentSignal(): string`TransactionalSummaryInterface`getAccountTypeForPayment(): string`TransactionalSummaryInterface`getAccountNumberForPayment(): string`TransactionalSummaryInterface`getReceivableUnitId(): string`---

Functionality interfaceSignatureTransactionalAnalyticInterface`getRegistryType(): int`TransactionalAnalyticInterface`getEstablishmentCode(): string`TransactionalAnalyticInterface`getSalesSummaryNumber(): string`TransactionalAnalyticInterface`getAcquirerNsu(): string`TransactionalAnalyticInterface`getTransactionDate(): DateTimeInterface`TransactionalAnalyticInterface`getCardNumber(): string`TransactionalAnalyticInterface`getTransactionAmount(): string`TransactionalAnalyticInterface`getWithdrawalAmount(): string`TransactionalAnalyticInterface`getBoardingTaxAmount(): string`TransactionalAnalyticInterface`getInstallments(): int`TransactionalAnalyticInterface`getInstallment(): int`TransactionalAnalyticInterface`getInstallmentAmount(): string`TransactionalAnalyticInterface`getPaymentDate(): DateTimeInterface`TransactionalAnalyticInterface`getAuthorizationCode(): string`TransactionalAnalyticInterface`getCaptureMethod(): string`TransactionalAnalyticInterface`getTransactionStatus(): string`TransactionalAnalyticInterface`getEstablishmentCodeOrigin(): string`TransactionalAnalyticInterface`getTerminalCode(): string`TransactionalAnalyticInterface`getCurrencyCode(): int`TransactionalAnalyticInterface`getCardIssuerOrigin(): string`TransactionalAnalyticInterface`getTransactionAdjustmentSignal(): string`TransactionalAnalyticInterface`getDigitalWallet(): string`TransactionalAnalyticInterface`getSaleComissionAmount(): string`TransactionalAnalyticInterface`getMetadataContentType(): string`TransactionalAnalyticInterface`getMetadata(): string`TransactionalAnalyticInterface`getMetadata2ContentType(): string`TransactionalAnalyticInterface`getMetadata2(): string`

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

6

Last Release

792d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4d9da6d81de7ebab59b0b9bda2a84521bc2300856c72c896bc63bd800ed099dd?d=identicon)[vitorkubinyete](/maintainers/vitorkubinyete)

---

Top Contributors

[![Kubinyete](https://avatars.githubusercontent.com/u/23388918?v=4)](https://github.com/Kubinyete "Kubinyete (12 commits)")

---

Tags

acquirerconciliationedigetnetgetnet-brasillibraryparserparsing

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kubinyete-getnet-edi/health.svg)

```
[![Health](https://phpackages.com/badges/kubinyete-getnet-edi/health.svg)](https://phpackages.com/packages/kubinyete-getnet-edi)
```

###  Alternatives

[composer/composer

Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.

29.5k196.2M3.1k](/packages/composer-composer)[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k251.2M25.2k](/packages/friendsofphp-php-cs-fixer)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[getgrav/grav

Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS

15.6k86.4k1](/packages/getgrav-grav)[ssch/typo3-rector

Instant fixes for your TYPO3 PHP code by using Rector.

2603.2M436](/packages/ssch-typo3-rector)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
