PHP code example of duxphp / bank-card

1. Go to this page and download the library: Download duxphp/bank-card 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/ */

    

duxphp / bank-card example snippets


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' => '信用卡',	// 卡类型名称

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