bukashk0zzz / hellosign-bundle
一个简单的用于HelloSign官方SDK的Symfony2/Symfony3包。
v1.0.1
2016-05-30 12:50 UTC
Requires
- php: >=5.6.0
- hellosign/hellosign-php-sdk: ^3.4.3
- symfony/symfony: ^2.8.6|^3.0.6
Requires (Dev)
This package is auto-updated.
Last update: 2024-09-04 20:39:46 UTC
README
#Symfony2/Symfony3 HelloSign Bundle
关于
安装
将以下内容添加到您的composer.json
文件中
"require": { "bukashk0zzz/hellosign-bundle": "dev-master", }
将包添加到app/AppKernel.php
$bundles = array( // ... other bundles new Bukashk0zzz\HelloSignBundle\Bukashk0zzzHelloSignBundle(), );
配置
将以下内容添加到您的config.yml
文件中
bukashk0zzz_hello_sign: #(Required) email address or apikey or OAuthToken login: 'XXXXXXXX' #(Optional, default: null) Null if using apikey or OAuthToken password: 'ZZZ' #(Optional, default: https://api.hellosign.com/v3/) alternative api base url url: 'https://api.hellosign.com/v3/' #(Optional, default: https://www.hellosign.com/oauth/token) alternative oauth url oauth_url: 'https://www.hellosign.com/oauth/token'
使用方法
提供的服务
在控制器内部
class DocsController extends Controller { public function createSignatureRequestAction() { $request = new HelloSign\TemplateSignatureRequest; $request->enableTestMode(); $request->setTemplateId($template->getId()); $request->setSubject('Purchase Order'); $request->setMessage('Glad we could come to an agreement.'); $request->setSigner('Client', 'george@example.com', 'George'); $request->setCC('Accounting', 'accounting@example.com'); $request->setCustomFieldValue('Cost', '$20,000'); $response = $this->getContainer()->get('hellosign.client')->sendTemplateSignatureRequest($request); } }
版权 / 许可证
请参阅LICENSE