taitai42/docusign
Composer 安装命令:
composer require taitai42/docusign
包简介
DocuSign Rest API Wrapper for Laravel 5
README 文档
README
- This package was developed to utilize e-contract/signatures directly within a Laravel based CRM.
Installation
Add the following to your composer.json file.
"tjphippen/docusign": "0.3.*@dev"
Then run composer install or composer update to download and install.
You'll then need to register the service provider in your config/app.php file within providers.
'providers' => array( Tjphippen\Docusign\DocusignServiceProvider::class, )
DocuSign includes a auto registered facade which provides the static syntax for managing envelopes, recipients etc. If you have issues simply add it manually to your aliases array
'aliases' => array( 'Docusign' => Tjphippen\Docusign\Facades\Docusign::class, )
Create configuration file using artisan
$ php artisan vendor:publish
The configuration file will be published to config/docusign.php which must be completed to make connections to the API.
/** * The DocuSign Integrator's Key */ 'integrator_key' => '', /** * The Docusign Account Email */ 'email' => '', /** * The Docusign Account Password */ 'password' => '', ...
Examples
Get List of Users
Docusign::getUsers();
Get Individual User
Docusign::getUser($userId); Docusign::getUser($userId, true); // When true, the full list of user information is returned for the user.
Get Folders
Docusign::getFolders(); // By default only the list of template folders are returned Docusign::getFolders(true); // Will return normal folders plus template folders
Get Folder Envelope List
Docusign::getFolderEnvelopes($folderId);
See: All Parameters for this method.
Docusign::getFolderEnvelopes($folderId, array( 'start_position' => 1, // Integer 'from_date' => '', // date/Time 'to_date' => '', // date/Time 'search_text' => '', // String 'status' => 'created', // Status 'owner_name' => '', // username 'owner_email' => '', // email );
Get List of Templates
Docusign::getTemplates();
Or with Additional Parameters.
Docusign::getTemplates(array( 'folder' => 1, // String (folder name or folder ID) 'folder_ids' => '', // Comma separated list of folder ID GUIDs. 'include' => '', // Comma separated list of additional template attributes ... );
Get Template
Docusign::getTemplate($templateId);
Get Multiple Envelopes
$envelopes = array('49d91fa5-1259-443f-85fc-708379fd7bbe', '8b2d44a-41dc-4698-9233-4be0678c345c'); Docusign::getEnvelopes($envelopes);
Get Individual Envelope
Docusign::getEnvelope($envelopeId);
Get Envelope Recipient
Docusign::getEnvelopeRecipients($envelopeId);
To include tabs simply set the second parameter to true:
Docusign::getEnvelopeRecipients($envelopeId, true);
Get Envelope Custom Fields
Docusign::getEnvelopeCustomFields($envelopeId);
Get Tab Information for a Recipient
See: Tab Parameters
Docusign::getEnvelopeTabs($envelopeId, $recipientId);
Modify Tabs for a Recipient
This one is a bit tricky. The tabId is required and must be within set of arrays.
See: [Tab Types and Parameters] (https://www.docusign.com/p/RESTAPIGuide/RESTAPIGuide.htm#REST%20API%20References/Tab%20Parameters.htm)
$tabs = ['textTabs' => [['tabId' => '270269f6-4a84-4ff9-86db-2a572eb73d99', 'value' => '123 Fake Street']]]; Docusign::updateRecipientTabs($envelopeId, $recipientId, $tabs);
Create/Send an Envelope from a Template
See: Send an Envelope or Create a Draft Envelope for full list of parameters/options.
Docusign::createEnvelope(array( 'templateId' => 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', // Template ID 'emailSubject' => 'Demo Envelope Subject', // Subject of email sent to all recipients 'status' => 'created', // created = draft ('sent' will send the envelope!) 'templateRoles' => array( ['name' => 'TJ Phippen', 'email' => 'tj@tjphippen.com', 'roleName' => 'Contractor', 'clientUserId' => 1], ['name' => 'Jane Someone', 'email' => 'demo@demo.com', 'roleName' => 'Customer']), ));
Modify Draft Envelope Email Subject and Message
The updateEnvelope method can be used in a variety of ways..
Docusign::updateEnvelope($envelopeId, array( 'emailSubject' => 'New Email Subject', // Required 'emailBlurb' => 'Email message body text' ));
Post Recipient View
Returns embeded signing URL. [Reference] (https://www.docusign.com/p/RESTAPIGuide/RESTAPIGuide.htm#REST%20API%20References/Post%20Recipient%20View.htm)
Docusign::createRecipientView($envelopeId, array( 'userName' => 'TJ Phippen', 'email' => 'tj@tjphippen.com', 'AuthenticationMethod' => 'email', 'clientUserId' => 1, // Must create envelope with this ID 'returnUrl' => 'http://your-site.tdl/returningUrl' ));
Send Draft Envelope
Docusign::updateEnvelope($envelopeId, ['status' => 'sent']);
Void Envelope
Docusign::updateEnvelope($envelopeId, array( 'status' => 'voided', 'voidedReason' => 'Just Testing' ));
Delete Envelope
Docusign::deleteEnvelope($envelopeId);
Change Log
v0.2.0
- Updated Guzzle dependancy & namespace
v0.2.0
- Added trait
v0.1.0
- Released
taitai42/docusign 适用场景与选型建议
taitai42/docusign 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10.36k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 01 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「documents」 「laravel」 「sign」 「laravel 5」 「docusign」 「envelope」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 taitai42/docusign 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 taitai42/docusign 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 taitai42/docusign 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A simple library to decode and parse Apple Sign In client tokens.
Laravel MPdf : Easily generate PDF files with arabic support
Zoho Sign v1 API PHP Wrapper - PHP 7.4 Ready
A package for easy integration between Laravel applications and Autentique's digital signature service.
Ready to use Documents Backpack CRUD with API route for eg. privacy statement, imprint, sbt or gtc
Alfabank REST API integration
统计信息
- 总下载量: 10.36k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 18
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-01-03