PHP code example of jimchen / identity-verify
1. Go to this page and download the library: Download jimchen/identity-verify 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/ */
jimchen / identity-verify example snippets
use JimChen\Identity\Identity;
use JimChen\Identity\Exceptions\NoGatewayAvailableException;
$identity = new Identity([
'default' => [
'gateways' => [
'juhe'
]
],
'gateways' => [
'juhe' => [
'key' => 'your app key',
'openid' => 'your openid',
]
]
]);
try {
var_dump($identity->verify('your name', 'chinese mainland identity card number'));
} catch (NoGatewayAvailableException $e) {
var_dump($e->getResults());
}