PHP code example of hedeqiang / bank-card-info

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

    

hedeqiang / bank-card-info example snippets

shell


ang\BankCardInfo\BankCard;

$card = new BankCard();
$response = $card->getInfo('6212260200142520000');
var_dump($response);
shell


namespace App\Http\Controllers;

use Hedeqiang\BankCardInfo\BankCard;
use Illuminate\Http\Request;

class BankCardController extends Controller
{
    public function index(Request $request,BankCard $bankCard)
    {
        return $bankCard->getInfo('62122602001000000');
    }
}
shell


namespace App\Http\Controllers;

use Hedeqiang\BankCardInfo\BankCard;
use Illuminate\Http\Request;

class BankCardController extends Controller
{
    public function index(Request $request,BankCard $bankCard)
    {
        return app('BankCard')->getInfo('62122602001000000');
    }
}