{"id":19881842,"url":"https://github.com/kubinyete/getnet-edi-php","last_synced_at":"2025-10-08T01:55:15.100Z","repository":{"id":234302989,"uuid":"788614825","full_name":"Kubinyete/getnet-edi-php","owner":"Kubinyete","description":"A standard library for parsing EDI files from Getnet.","archived":false,"fork":false,"pushed_at":"2024-05-03T13:27:08.000Z","size":27,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-15T11:20:12.478Z","etag":null,"topics":["acquirer","conciliation","edi","getnet","getnet-brasil","library","parser","parsing"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kubinyete.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-18T18:55:22.000Z","updated_at":"2024-08-31T07:59:34.000Z","dependencies_parsed_at":"2024-05-03T15:11:21.880Z","dependency_job_id":null,"html_url":"https://github.com/Kubinyete/getnet-edi-php","commit_stats":null,"previous_names":["kubinyete/getnet-edi-php"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Kubinyete/getnet-edi-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kubinyete%2Fgetnet-edi-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kubinyete%2Fgetnet-edi-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kubinyete%2Fgetnet-edi-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kubinyete%2Fgetnet-edi-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kubinyete","download_url":"https://codeload.github.com/Kubinyete/getnet-edi-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kubinyete%2Fgetnet-edi-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278877088,"owners_count":26061380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["acquirer","conciliation","edi","getnet","getnet-brasil","library","parser","parsing"],"created_at":"2024-11-12T17:15:25.047Z","updated_at":"2025-10-08T01:55:15.075Z","avatar_url":"https://github.com/Kubinyete.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cimg align=\"middle\" src=\"https://site.getnet.com.br/wp-content/uploads/2021/08/logo-getnet.png\" width=\"128\"\u003e **EDI** for PHP\n\n**pt-BR**: Uma biblioteca simples e direta para carregar arquivos EDI da adquirente [Getnet](https://getnet.com.br/)\n\n**en-US**: A straightfoward library for loading EDI files from [Getnet](https://getnet.com.br/)\n\n***NOTA**: Este guia está primariamente em inglês, caso haja necessidade, será adicionado uma versão em pt-BR no futuro.*\n\n---\n\n### Warning\n\nThis package is still work-in-progress, there are plans for adding better support for document reading by providing\nindexing and class bindings to directly access those entries, for now we have only provided the basic parser \u0026 document wrapper, \nproviding the necessary means for line-by-line sequential reading.\n\n### Installation\n\nLet's start by requiring the package by running the following command\n```sh\ncomposer require kubinyete/getnet-edi\n```\n\n### Usage \n\n#### Basic line-by-line parsing\n\nProvides a basic document class for opening a EDI text-file\n\n```php\n// Opening a new document (version 10.1)\n$document = Kubinyete\\Edi\\Getnet\\Document\\Document::open('./sample/getnetextr_20240418_0000000_c101.txt');\n\n// Sequential reading\nwhile ($row = $document-\u003enext()) {\n    // Current line number that has been read\n    $lineNumber = $document-\u003ecurrentLineNumber();\n    // Current line contents that has been read\n    $lineContent = $document-\u003ecurrentLine();\n\n    // What type/class we got after parsing it.\n    $parsedType = get_class($row);\n\n    echo \"Current line {$lineNumber}: '{$lineContent}'\" . PHP_EOL;\n    echo \"Parsed content ($parsedType): \" . json_encode($row, JSON_PRETTY_PRINT) . PHP_EOL;\n    // @NOTE: This is only a sample code for visualizing each entry that has been parsed\n}\n\n```\n\nThe above code will output:\n\n```sh\nCurrent line 1: '01804202407321018042024CEADM1000000000        00000000000000GETNET S.A.         000000001GSSANT. V.10.1 400 BYTES                                                                                                                                                                                                                                                                                               '\nParsed content (Kubinyete\\Edi\\Getnet\\Registry\\Header): {\n    \"registryType\": 0,\n    \"fileCreationDate\": {\n        \"date\": \"2024-04-18 07:32:10.000000\",\n        \"timezone_type\": 3,\n        \"timezone\": \"America\\/Sao_Paulo\"\n    },\n    \"movementReferenceDate\": {\n        \"date\": \"2024-04-18 00:00:00.000000\",\n        \"timezone_type\": 3,\n        \"timezone\": \"America\\/Sao_Paulo\"\n    },\n    \"fileVersion\": \"CEADM100\",\n    \"establishmentCode\": \"0000000\",\n    \"acquirerDocument\": \"00000000000000\",\n    \"acquirerName\": \"GETNET S.A.\",\n    \"sequenceNumber\": 1,\n    \"acquirerCode\": \"GS\",\n    \"layoutVersion\": \"SANT. V.10.1 400 BYTES\",\n    \"_padding\": \"\"\n}\n```\n\n### Type reference\n\nQuick type reference for each registry type and associated baseline version.\n\nWe advice only to expect the associated registry interface, and not its defined type, this will prevent any breaking\nchange from affecting your application immediately (Ex: Name changes, value type changes, and so on)\n\nIf there are any changes that are not retrocompatible, a new type or associated interface will be used for that functionality.\n\n| Type   | Version     | Registry type       | Interface\n| ------ | ----------- | ------------------- | ---------\n| 0      | \u003e=10.1      | Kubinyete\\Edi\\Getnet\\Registry\\Header                | HeaderInterface\n| 1      | \u003e=10.1      | Kubinyete\\Edi\\Getnet\\Registry\\TransactionalSummary  | TransactionalSummaryInterface\n| 2      | \u003e=10.1      | Kubinyete\\Edi\\Getnet\\Registry\\TransactionalAnalytic | TransactionalAnalyticInterface\n| 3      | \u003e=10.1      | Kubinyete\\Edi\\Getnet\\Registry\\FinantialAdjustment   | FinantialAdjustmentInterface\n| 4      | -           | -                                                   | -\n| 5      | \u003e=10.1      | Kubinyete\\Edi\\Getnet\\Registry\\FinantialSummary      | -\n| 6      | \u003e=10.1      | Kubinyete\\Edi\\Getnet\\Registry\\FinantialDetail       | -\n| 9      | \u003e=10.1      | Kubinyete\\Edi\\Getnet\\Registry\\Trailer               | TrailerInterface\n\n### Registry types\n\n| Functionality interface                                | Signature\n| ------------------------------------------------------ | ------\n| HeaderInterface | `getFileCreationDate(): DateTimeInterface`\n| HeaderInterface | `getMovementReferenceDate(): DateTimeInterface`\n| HeaderInterface | `getFileVersion(): string`\n| HeaderInterface | `getEstablishmentCode(): string`\n| HeaderInterface | `getAcquirerDocument(): string`\n| HeaderInterface | `getAcquirerName(): string`\n| HeaderInterface | `getSequenceNumber(): int`\n| HeaderInterface | `getAcquirerCode(): string`\n| HeaderInterface | `getLayoutVersion(): string`\n\n---\n\n| Functionality interface                                 | Signature                                        \n| ------------------------------------------------------  | --------------------------------------------- \n| TrailerInterface | `getRegistryQuantity(): int`                    \n\n---\n\n| Functionality interface                                 | Signature                                        \n| ------------------------------------------------------  | --------------------------------------------- \n| FinantialAdjustmentInterface | `getRegistryType(): int`\n| FinantialAdjustmentInterface | `getEstablishmentCode(): string`\n| FinantialAdjustmentInterface | `getSalesSummaryNumber(): string`\n| FinantialAdjustmentInterface | `getSalesSummaryDate(): DateTimeInterface`\n| FinantialAdjustmentInterface | `getSalesSummaryPaymentDate(): DateTimeInterface`\n| FinantialAdjustmentInterface | `getAdjustmentId(): string`\n| FinantialAdjustmentInterface | `getWhiteSpace(): string`\n| FinantialAdjustmentInterface | `getAdjustmentSignal(): string`\n| FinantialAdjustmentInterface | `getAdjustmentAmount(): string`\n| FinantialAdjustmentInterface | `getAdjustmentReasonCode(): string`\n| FinantialAdjustmentInterface | `getLetterDate(): DateTimeInterface`\n| FinantialAdjustmentInterface | `getCardNumber(): string`\n| FinantialAdjustmentInterface | `getSalesSummaryNumberOriginal(): string`\n| FinantialAdjustmentInterface | `getAcquirerNsu(): string`\n| FinantialAdjustmentInterface | `getTransactionDateOriginal(): DateTimeInterface`\n| FinantialAdjustmentInterface | `getPaymentTypeIndicator(): string`\n| FinantialAdjustmentInterface | `getTerminalCodeOriginal(): string`\n| FinantialAdjustmentInterface | `getPaymentDateOriginal(): DateTimeInterface`\n| FinantialAdjustmentInterface | `getCurrencyCode(): int`\n| FinantialAdjustmentInterface | `getSaleComissionAmount(): string`\n| FinantialAdjustmentInterface | `getMetadataContentType(): string`\n| FinantialAdjustmentInterface | `getMetadata(): string`\n\n---\n\n| Functionality interface                                 | Signature                                        \n| ------------------------------------------------------  | --------------------------------------------- \n| TransactionalSummaryInterface | `getRegistryType(): int`\n| TransactionalSummaryInterface | `getEstablishmentCode(): string`\n| TransactionalSummaryInterface | `getProductCode(): string`\n| TransactionalSummaryInterface | `getCaptureSignature(): string`\n| TransactionalSummaryInterface | `getSalesSummaryNumber(): string`\n| TransactionalSummaryInterface | `getSalesSummaryDate(): DateTimeInterface`\n| TransactionalSummaryInterface | `getSalesSummaryPaymentDate(): DateTimeInterface`\n| TransactionalSummaryInterface | `getBankCode(): string`\n| TransactionalSummaryInterface | `getBankAgency(): string`\n| TransactionalSummaryInterface | `getCheckingAccount(): string`\n| TransactionalSummaryInterface | `getSalesAcceptedQuantity(): int`\n| TransactionalSummaryInterface | `getSalesRejectedQuantity(): int`\n| TransactionalSummaryInterface | `getGrossAmount(): string`\n| TransactionalSummaryInterface | `getAmount(): string`\n| TransactionalSummaryInterface | `getFareAmount(): string`\n| TransactionalSummaryInterface | `getDiscountRateAmount(): string`\n| TransactionalSummaryInterface | `getTotalRejectedAmount(): string`\n| TransactionalSummaryInterface | `getTotalCreditAmount(): string`\n| TransactionalSummaryInterface | `getChargesAmount(): string`\n| TransactionalSummaryInterface | `getPaymentTypeIndicator(): string`\n| TransactionalSummaryInterface | `getSalesSummaryInstallment(): int`\n| TransactionalSummaryInterface | `getSalesSummaryInstallments(): int`\n| TransactionalSummaryInterface | `getEstablishmentCodeOrigin(): string`\n| TransactionalSummaryInterface | `getAnticipationOperationNumber(): string`\n| TransactionalSummaryInterface | `getDueDateOriginal(): DateTimeInterface`\n| TransactionalSummaryInterface | `getOperationCost(): string`\n| TransactionalSummaryInterface | `getSalesSummaryAnticipationAmount(): string`\n| TransactionalSummaryInterface | `getChargeControlNumber(): string`\n| TransactionalSummaryInterface | `getChargeAmount(): string`\n| TransactionalSummaryInterface | `getCompensationId(): string`\n| TransactionalSummaryInterface | `getCurrencyCode(): int`\n| TransactionalSummaryInterface | `getChargeWriteOffIdentifier(): string`\n| TransactionalSummaryInterface | `getTransactionAdjustmentSignal(): string`\n| TransactionalSummaryInterface | `getAccountTypeForPayment(): string`\n| TransactionalSummaryInterface | `getAccountNumberForPayment(): string`\n| TransactionalSummaryInterface | `getReceivableUnitId(): string`\n\n---\n\n| Functionality interface                                 | Signature                                        \n| ------------------------------------------------------  | --------------------------------------------- \n| TransactionalAnalyticInterface | `getRegistryType(): int`\n| TransactionalAnalyticInterface | `getEstablishmentCode(): string`\n| TransactionalAnalyticInterface | `getSalesSummaryNumber(): string`\n| TransactionalAnalyticInterface | `getAcquirerNsu(): string`\n| TransactionalAnalyticInterface | `getTransactionDate(): DateTimeInterface`\n| TransactionalAnalyticInterface | `getCardNumber(): string`\n| TransactionalAnalyticInterface | `getTransactionAmount(): string`\n| TransactionalAnalyticInterface | `getWithdrawalAmount(): string`\n| TransactionalAnalyticInterface | `getBoardingTaxAmount(): string`\n| TransactionalAnalyticInterface | `getInstallments(): int`\n| TransactionalAnalyticInterface | `getInstallment(): int`\n| TransactionalAnalyticInterface | `getInstallmentAmount(): string`\n| TransactionalAnalyticInterface | `getPaymentDate(): DateTimeInterface`\n| TransactionalAnalyticInterface | `getAuthorizationCode(): string`\n| TransactionalAnalyticInterface | `getCaptureMethod(): string`\n| TransactionalAnalyticInterface | `getTransactionStatus(): string`\n| TransactionalAnalyticInterface | `getEstablishmentCodeOrigin(): string`\n| TransactionalAnalyticInterface | `getTerminalCode(): string`\n| TransactionalAnalyticInterface | `getCurrencyCode(): int`\n| TransactionalAnalyticInterface | `getCardIssuerOrigin(): string`\n| TransactionalAnalyticInterface | `getTransactionAdjustmentSignal(): string`\n| TransactionalAnalyticInterface | `getDigitalWallet(): string`\n| TransactionalAnalyticInterface | `getSaleComissionAmount(): string`\n| TransactionalAnalyticInterface | `getMetadataContentType(): string`\n| TransactionalAnalyticInterface | `getMetadata(): string`\n| TransactionalAnalyticInterface | `getMetadata2ContentType(): string`\n| TransactionalAnalyticInterface | `getMetadata2(): string`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubinyete%2Fgetnet-edi-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkubinyete%2Fgetnet-edi-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubinyete%2Fgetnet-edi-php/lists"}