mrleonix/boleto-reader

用于从boleto获取信息

1.0.1 2019-08-16 05:58 UTC

This package is auto-updated.

Last update: 2024-09-16 17:42:58 UTC


README

PHP 项目,用于从 boleto 获取信息,例如

  • 银行
  • 货币
  • 到期日
  • 号码
  • 金额

安装

使用 Composer 安装 boleto-reader

composer require mrleonix/boleto-reader

用法

create 函数返回一个 Boleto 实例。

$boletoNumber = '34190.00000 00000.000003 41000.000000 0 44442000005025'; // Bank boleto type
$boleto = Boleto::create($boletoNumber);

$boletoNumber = '84670000001-7 43590024020-9 02405000243-5 84221010811-9'; // Dealership boleto type
$boletoTwo = Boleto::create($boletoNumber);

然后您可以按照以下方式访问 Boleto 信息

// Getters only !

$boleto->bank // @return Bank
$boleto->bank->code // @return string
$boleto->bank->name // @return string
$boleto->coin // @return Coin
$boleto->coin->code // @return string
$boleto->coin->name // @return string
$boleto->dueDate // @return Carbon
$boleto->number // @return string
$boleto->type // @return string
$boleto->value // @return float

注意: 经销商 boleto 没有具有 bankcoindueDate 属性。

贡献

欢迎拉取请求。对于主要更改,请先提交一个问题以讨论您希望更改的内容。

请确保适当更新测试。

许可

MIT