PHPackages                             duxphp/bank-card - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. duxphp/bank-card

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

duxphp/bank-card
================

Get the bank card info

2.0.3(8y ago)123MITPHP

Since Aug 20Pushed 8y ago1 watchersCompare

[ Source](https://github.com/duxphp/bank-card)[ Packagist](https://packagist.org/packages/duxphp/bank-card)[ RSS](/packages/duxphp-bank-card/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)DependenciesVersions (7)Used By (0)

\#Bank Card Info

项目根据[zhuzhichao](https://github.com/zhuzhichao/bank-card-info)进行修改补充用于项目

根据银行卡号获取银行信息（银行名称, 信用卡/借记卡, 银行LOGO 等）, 供任何 PHP 框架或者原生代码使用.

```
BankCard::info('6225700000000000');

// 将得到
array (size=6)
  'validated'    => true			// 是否验证成功
  'bank'         => 'CEB',			// 银行标识
  'bankName'     => '中国光大银行' ,	// 银行名称
  'bankImg'      => 'https://apimg.alipay.com/combo.png?d=cashier&t=CEB',  // 银行LOGO
  'cardType'     => 'CC',		// 卡类型
  'cardTypeName' => '信用卡',	// 卡类型名称

```

\##特点

1. 不配置和使用数据库，妈妈再也不用担心配置问题了
2. 使用简单，功能专（dān）注（yī）
3. 使用[composer](https://getcomposer.org/)进行安装管理，国际标准，方便快捷，即安即用，随时更新数据库

\##Install

`composer require "duxphp/bank-card"`。

\##Usage

1.安装该插件

2.加载插件

3.然后开始在你的项目里面使用了 `BankCard::info('6225700000000000', bool)` 获取银行卡信息.

```
// 返回结果
array (size=6)
  'validated'    => true
  'bank'         => 'CEB',
  'bankName'     => '中国光大银行' ,
  'bankImg'      => 'https://apimg.alipay.com/combo.png?d=cashier&t=CEB',
  'cardType'     => 'CC',
  'cardTypeName' => '信用卡',

```

4.获取银行列表信息 `BankCard::getBankList()` , 如下

```
array (size=165)
  'SRCB'   =>  '深圳农村商业银行',
  'BGB'    =>  '广西北部湾银行',
  'SHRCB'  =>  '上海农村商业银行',
  'BJBANK' =>  '北京银行',
  'WHCCB'  =>  '威海市商业银行',
  'BOZK'   =>  '周口银行',
  ...
  'LYBANK' =>  '洛阳银行',
  'GDB'    =>  '广东发展银行',
  'ZBCB'   =>  '齐商银行',
  'CBKF'   =>  '开封市商业银行',

```

5.获取银行名称 `BankCard::getBankNameList()` , 如下

```
array (size=165)
  0 => '深圳农村商业银行',
  1 => '广西北部湾银行',
  2 => '上海农村商业银行',
  3 => '北京银行',
  ...
  125 => '广东发展银行',
  126 => '齐商银行',
  127 => '开封市商业银行',
  more elements...

```

6.单独获取银行LOGO `BankCard::getBankImg('ABC')` 或者手动复制`src/logo`目录下logo

```
https://apimg.alipay.com/combo.png?d=cashier&t=ABC

```

7.小图标获取,手动复制`src/small_logo`目录下logo，小图标为人工ps处理，只用于规则内银行，如有兴趣可以添加后提交给我

\##鸣谢 支付宝提供的这么好用的接口 ^\_^

\##Contributing 有什么新的想法和建议，欢迎提交[issue](https://github.com/zhuzhichao/bank-card-info/issues)或者[Pull Requests](https://github.com/zhuzhichao/bank-card-info/pulls)。

\##License MIT

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 73.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~166 days

Recently: every ~207 days

Total

6

Last Release

3087d ago

Major Versions

1.0.1 → 2.02016-06-11

### Community

Maintainers

![](https://www.gravatar.com/avatar/d4553e50838920d29d2d9ae7b9472761ac4f5e88d34520842a0dbb704d465b37?d=identicon)[duxphp](/maintainers/duxphp)

---

Top Contributors

[![zhichao-poper](https://avatars.githubusercontent.com/u/141097055?v=4)](https://github.com/zhichao-poper "zhichao-poper (14 commits)")[![duxphp](https://avatars.githubusercontent.com/u/2184214?v=4)](https://github.com/duxphp "duxphp (3 commits)")[![orvice](https://avatars.githubusercontent.com/u/1532235?v=4)](https://github.com/orvice "orvice (1 commits)")[![refear99](https://avatars.githubusercontent.com/u/7454701?v=4)](https://github.com/refear99 "refear99 (1 commits)")

---

Tags

BankChinesecard info

### Embed Badge

![Health badge](/badges/duxphp-bank-card/health.svg)

```
[![Health](https://phpackages.com/badges/duxphp-bank-card/health.svg)](https://phpackages.com/packages/duxphp-bank-card)
```

###  Alternatives

[overtrue/pinyin

Chinese to pinyin translator.

4.5k6.5M72](/packages/overtrue-pinyin)[zhuzhichao/bank-card-info

Get the bank card info

45464.8k](/packages/zhuzhichao-bank-card-info)[zhuzhichao/ip-location-zh

get the ip's location info with Chinese

617212.5k11](/packages/zhuzhichao-ip-location-zh)[overtrue/chinese-calendar

中国农历转换与查询工具

557103.7k4](/packages/overtrue-chinese-calendar)[douyasi/identity-card

Chinese Identity Card package

17851.4k3](/packages/douyasi-identity-card)[wilon/php-number2chinese

PHP数字转为汉字描述、人民币大写方法。

14632.0k1](/packages/wilon-php-number2chinese)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
