bee-delivery/bank-account-validator 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

bee-delivery/bank-account-validator

Composer 安装命令:

composer require bee-delivery/bank-account-validator

包简介

A bank account validator for brazilian bank accounts

README 文档

README

A bank account validator for brazilian bank accounts.

Getting started

Bank account validation is performed under the verifying digit rules of the following banks (values based on char count):

BANK AG - DV AC - DV TYPE AC OBS
001 Banco do Brasil 4 - 1 8 - 1
004 Banco do Nordeste 4 7 - 1 2 (not included) not checking DVs
033 Banco Santander 4 8 - 1 2 (added to AC)
041 Banrisul 4 - 2 9 - 1 2 (added to AC)
077 Banco Inter 4 7 - 1
104 Caixa Econômica Federal 4 11 - 1 3 (added to AC)
237 Banco Bradesco 4 - 1 7 - 1
237 Next bank 4 7 - 1 same thing as Bradesco
260 Nubank 4 7 - 1
341 Banco Itaú 4 5 - 1
399 HSBC 4 6 - 1
745 Citibank 4 10 - 1

For other banks a default validation is performed:

  • Agency from 1 to 4 numbers.
  • 0-2 character agency digit.
  • Account from 1 to 12 numbers.
  • 0-2 character account digit.

Installing

Install with composer:

composer require bee-delivery/bank-account-validator

Usage

The bank details received via the form must be passed as a parameter to the function called 'validate'.

<?php

    use BeeDelivery\BankAccountValidator\BankAccount;
    
    // ..

    $params = (object) array(
        'bankNumber' => $this->bank,
        'agencyNumber' => $this->agency_number,
        'agencyCheckNumber' => $this->agency_check_number,
        'accountNumber' => $this->account_number,
        'accountCheckNumber' => $this->account_check_number,
        'ignoreAgencyCheckNumber' => true, // or false
        'ignoreTypeCEFAccount' => true // or false
    );

    $data = BankAccount::validate($params);

    // ..

It will return an array with two attributes: 'params' with params formatted properly and 'errors' containing possible errors found.

Bank Codes

A listing of all banks you can get at http://www.codigobanco.com.

License

Feel free to help us. Make a pr :)

GNU General Public License v3

统计信息

  • 总下载量: 17.04k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-only
  • 更新时间: 2019-08-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固