Giter VIP home page Giter VIP logo

signit's Introduction

signit

易企签 php sdk

安装

$ composer require chenpkg/signit -vvv

使用

require './vendor/autoload.php';

//use 
use Signit\Factory;

$config = [
    'client_id' => 'xxxx',
    'client_secret' => 'xxxxx',
    
    // 可选
    'base_url' => 'https://open.signit.cn/v1/open'
];

$app = new Factory($config);

$data = [
    //...
];

// 快捷签署
$app->envelopes->quick($data);

// 发起签署流程
$app->envelopes->start($data);

$name = '张三';
$idCardNo = '510113...';
$phone = '18888888888';
$bankNumber = '65123154...';
$customTag = mt_rand(1000, 9999);

// 手机三网认证
$app->auth->phone($name, $idCardNo, $phone, $customTag);

// 银行卡四要素认证
$app->auth->bank($name, $idCardNo, $phone, $bankNumber, $customTag);

缓存替换

use Symfony\Component\Cache\Adapter\RedisAdapter;

// laravel
$cache = new RedisAdapter(app('redis')->connection()->client());
$app->rebind('cache', $cache);

// redis client
$app->rebind('cache', new RedisAdapter(new \Redis()));

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.