PHP code example of zhuzhichao / bank-card-info

1. Go to this page and download the library: Download zhuzhichao/bank-card-info library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

zhuzhichao / bank-card-info example snippets




hichao\BankCardInfo\BankCard;


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

'aliases' => [
    'BankCard'  => 'Zhuzhichao\BankCardInfo\BankCard',

],

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',		// 卡类型:CC 信用卡 DC 储蓄卡
  'cardTypeName' => '信用卡',	// 卡类型名称:信用卡 | 储蓄卡

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

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