This package acts as a wrapper, for the HelloSign PHP SDK, to inject the relevant credentials and allow you to use the package in the container. Some examples of usage have been provided below.
See the HelloSign PHP SDK for full details.
Take a look at contributing.md to see a to do list.
Via Composer
$ composer require industrious/hellosign-laravel
Publish the config, and add the relevant API authentication details to your .env
file.
php artisan vendor:publish --tag=laravel-hellosign
/**
* @param HelloSignLaravel\Client $client
*/
public function client(Client $client)
{
$client = $client->getAccount();
...
/**
* @param HelloSignLaravel\Classes\SignatureRequest $signature_request
*/
public function sign(SignatureRequest $signature_request)
{
$request = $signature_request
->setTitle('Title')
->setSubject('Subject')
->setMessage('Message')
->addSigner('[email protected]', 'Client name');
$file = storage_path('app/file.pdf');
$request->addFile($file);
$response = $request->send();
...
/**
* @param HelloSignLaravel\Classes\SignatureRequest $signature_request
*/
public function templateSign(TemplateSignatureRequest $signature_request)
{
$request = $signature_request
->setTemplateId(config('hellosign.templates.contract'))
->setTitle('Title')
->setSubject('Subject')
->setMessage('Message')
->setSigner('Client', '[email protected]', 'Test User');
$request->setCustomFieldValue('Name', 'Test User');
$response = $request->send();
...
Please see the changelog for more information on what has changed recently.
$ composer test
Please see contributing.md for details and a todolist.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
MIT. Please see the license file for more information.