此包的最新版本(1.4.1)没有可用的许可证信息。

用于创建CNAB格式汇款文件和处理返回文件的工程项目

1.4.1 2022-10-20 21:55 UTC

This package is auto-updated.

Last update: 2024-09-21 02:43:08 UTC


README

Join the chat at https://gitter.im/andersondanilo/CnabPHP

Build Status Latest Stable Version Latest Unstable Version Code Climate Test Coverage

用于创建汇款文件和处理CNAB格式返回文件的工程项目,通常用于银行中的银行汇票。

功能

  • 读取和生成CNAB 240和400格式的返回和汇款文件

安装

Composer

使用composer安装

composer require guilhermecfviana/cnab_php

如何使用

读取返回文件

$cnabFactory = new Cnab\Factory();
$arquivo = $cnabFactory->createRetorno('AQUI VAI O CAMINHO DO ARQUIVO DE RETORNO, EX: RET1010.RET');
$detalhes = $arquivo->listDetalhes();
foreach($detalhes as $detalhe) {
    if($detalhe->getValorRecebido() > 0) {
        $nossoNumero   = $detalhe->getNossoNumero();
        $valorRecebido = $detalhe->getValorRecebido();
        $dataPagamento = $detalhe->getDataOcorrencia();
        $carteira      = $detalhe->getCarteira();
        // você já tem as informações, pode dar baixa no boleto aqui
    }
}

创建汇款文件

请参考wiki: https://github.com/andersondanilo/CnabPHP/wiki/Criando-um-arquivo-de-remessa

如何贡献

您可以通过测试(单元或手动)或通过cnab_yaml项目(https://github.com/andersondanilo/cnab_yaml)(cnab_php使用)将格式适配到其他银行。 阅读wiki

项目正在使用Waffle来管理新汇款和返回的实现状态

Stories in Ready

许可证

本项目采用MIT许可证