james.xue / esign-sdk
esign
Fund package maintenance!
xiaoxuan6.github.io/images/donate/alipayimg.jpg
xiaoxuan6.github.io/images/donate/wechatpayimg.png
Requires
- php: >=7.1
- ext-json: *
- guzzlehttp/guzzle: ^7.5
- pimple/pimple: ^3.5
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0.0
- mockery/mockery: ^1.5
- phpunit/phpunit: ^9.5
Suggests
- monolog/monolog: Required to use the log.
This package is auto-updated.
Last update: 2024-11-23 13:32:25 UTC
README
Usage
配置信息
$config = [
'mode' => 'dev', // dev:测试(默认) prod:正式
'app_id' => 'xxx',
'app_key' => 'xxx',
'client' => [
'verify' => false,
'timeout' => 10,
],
'middlewares' => [
'log' => \Vinhson\EsignSdk\Kernel\Middlewares\LogMiddleware::class,
],
/**
* 日志配置信息
*/
'log_enable' => true,
'log_path' => __DIR__ . '/../../access.log',
'log_max' => 7 // 日志保留天数
];
$app = new Vinhson\EsignSdk\Application($config);
容器中变量对应的类
* @property OCR\Client $ocr ocr识别能力
* @property Enterprise\Client $enterprise 信息查询
* @property Info\Client $info 信息对比能力
* @property AuthFlow\Client $auth 认证流程查询
* @property Account\Client $account 用户认证服务
OCD 检测
$app->ocr->idCard('xxxx', '')
tests
composer test