fp/assently
更新后的laravel Assently API客户端
dev-master
2023-02-12 17:07 UTC
Requires
- guzzlehttp/guzzle: ^7.5
- ramsey/uuid: ^4.7
This package is auto-updated.
Last update: 2024-09-12 20:21:09 UTC
README
使用composer运行以下命令进行安装:composer require fped/assently
将Assently\AssentlyServiceProvider
添加到您的providers数组中。
将以下行添加到您的.env文件中,并使用您自己的密钥更新它们
ASSENTLY_DEBUG=true
ASSENTLY_KEY=<KEY_HERE>
ASSENTLY_SECRET=<SECRET_HERE>
示例
创建并发送新的案例。
$assently = new Assently\Assently; $assently->authenticate(env('ASSENTLY_KEY'), env('ASSENTLY_SECRET')); $data = [ 'name' => 'Employmeent agreement '. rand(111, 999), 'NameAlias' => 'employmeent-agreement-'. rand(111, 999), 'AllowedSignatureTypes' => [ 'electronicid' ], 'Documents' => [ $assently->document()->create('path/to/document.pdf') ], "Parties" => [ $assently->party()->create([ 'Name' => 'John Doe', 'EmailAddress' => 'johndoe@gmail.com', 'AnyoneCanSign' => false ]) ] ]; $assently->case()->create($data)->send();
发送案例提醒
$assently = new Assently\Assently; $assently->authenticate(env('ASSENTLY_KEY'), env('ASSENTLY_SECRET')); $assently->case()->find('5a0e0869-6807-4b79-3712-466ea5cca5ce')->remind();