承接 kubinyete/getnet-edi 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

kubinyete/getnet-edi

Composer 安装命令:

composer require kubinyete/getnet-edi

包简介

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

README 文档

README

pt-BR: Uma biblioteca simples e direta para carregar arquivos EDI da adquirente Getnet

en-US: A straightfoward library for loading EDI files from Getnet

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

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 & document wrapper, providing the necessary means for line-by-line sequential reading.

Installation

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

composer require kubinyete/getnet-edi

Usage

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

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.

Type Version Registry type Interface
0 >=10.1 Kubinyete\Edi\Getnet\Registry\Header HeaderInterface
1 >=10.1 Kubinyete\Edi\Getnet\Registry\TransactionalSummary TransactionalSummaryInterface
2 >=10.1 Kubinyete\Edi\Getnet\Registry\TransactionalAnalytic TransactionalAnalyticInterface
3 >=10.1 Kubinyete\Edi\Getnet\Registry\FinantialAdjustment FinantialAdjustmentInterface
4 - - -
5 >=10.1 Kubinyete\Edi\Getnet\Registry\FinantialSummary -
6 >=10.1 Kubinyete\Edi\Getnet\Registry\FinantialDetail -
9 >=10.1 Kubinyete\Edi\Getnet\Registry\Trailer TrailerInterface

Registry types

Functionality interface Signature
HeaderInterface 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 interface Signature
TrailerInterface getRegistryQuantity(): int
Functionality interface Signature
FinantialAdjustmentInterface 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 interface Signature
TransactionalSummaryInterface 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 interface Signature
TransactionalAnalyticInterface 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

kubinyete/getnet-edi 适用场景与选型建议

kubinyete/getnet-edi 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 61 次下载、GitHub Stars 达 1, 最近一次更新时间为 2024 年 04 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 kubinyete/getnet-edi 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 kubinyete/getnet-edi 我们能提供哪些服务?
定制开发 / 二次开发

基于 kubinyete/getnet-edi 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2024-04-22