dev-master
9999999-devA clone of tjphippen/docusign with updates and some bugs fixs
MIT
The Requires
The Development Requires
by Karim Oulad Chalha
Wallogit.com
2017 © Pedro Peláez
A clone of tjphippen/docusign with updates and some bugs fixs
Add the following to your composer.json file., (*1)
"karim88/docusign": "dev-master"
Then run composer install or composer update to download and install., (*2)
You'll then need to register the service provider in your config/app.php file within providers., (*3)
'providers' => array(
Karim88\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, (*4)
'aliases' => array(
'Docusign' => Karim88\Docusign\Facades\Docusign::class,
)
$ php artisan vendor:publish
The configuration file will be published to config/docusign.php which must be completed to make connections to the API., (*5)
/** * The DocuSign Integrator's Key */ 'integrator_key' => '', /** * The Docusign Account Email */ 'email' => '', /** * The Docusign Account Password */ 'password' => '', ...
or set account informations dynamically by changing dynamic value to '1' in config/docusign.php, (*6)
'dynamic' => '1',
and set account informations in a session, (*7)
session(['integrator_key' => $your_integrator_key] session(['account_id' => $your_account_id])) session(['email' => $your_email]) session(['password' => $your_password])
Docusign::getUsers();
Docusign::getUser($userId); Docusign::getUser($userId, true); // When true, the full list of user information is returned for the user.
Docusign::getFolders(); // By default only the list of template folders are returned Docusign::getFolders(true); // Will return normal folders plus template folders
Docusign::getFolderEnvelopes($folderId);
See: All Parameters for this method., (*8)
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 );
Docusign::getTemplates();
Or with Additional Parameters., (*9)
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
...
);
Docusign::getTemplate($templateId);
$envelopes = array('49d91fa5-1259-443f-85fc-708379fd7bbe', '8b2d44a-41dc-4698-9233-4be0678c345c');
Docusign::getEnvelopes($envelopes);
Docusign::getEnvelope($envelopeId);
Docusign::getEnvelopeRecipients($envelopeId);
To include tabs simply set the second parameter to true:, (*10)
Docusign::getEnvelopeRecipients($envelopeId, true);
Docusign::getEnvelopeCustomFields($envelopeId);
See: Tab Parameters, (*11)
Docusign::getEnvelopeTabs($envelopeId, $recipientId);
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), (*12)
$tabs = ['textTabs' => [['tabId' => '270269f6-4a84-4ff9-86db-2a572eb73d99', 'value' => '123 Fake Street']]]; Docusign::updateRecipientTabs($envelopeId, $recipientId, $tabs);
See: Send an Envelope or Create a Draft Envelope for full list of parameters/options., (*13)
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' => 'John Snow',
'email' => 'john@snow.com',
'roleName' => 'Contractor',
'clientUserId' => 1],
['name' => 'Jane Someone',
'email' => 'demo@demo.com',
'roleName' => 'Customer']),
));
The updateEnvelope method can be used in a variety of ways.., (*14)
Docusign::updateEnvelope($envelopeId, array(
'emailSubject' => 'New Email Subject', // Required
'emailBlurb' => 'Email message body text'
));
Returns embeded signing URL. [Reference] (https://www.docusign.com/p/RESTAPIGuide/RESTAPIGuide.htm#REST%20API%20References/Post%20Recipient%20View.htm), (*15)
Docusign::createRecipientView($envelopeId, array(
'userName' => 'John Snow',
'email' => 'john@snow.com',
'AuthenticationMethod' => 'email',
'clientUserId' => 1, // Must create envelope with this ID
'returnUrl' => 'http://your-site.tdl/returningUrl'
));
Docusign::updateEnvelope($envelopeId, ['status' => 'sent']);
To get only the download url set $download=false,
by default the method download the document., (*16)
Docusign::downloadDocuments($envelopeId, $download=true)
Docusign::updateRecipients($envelopeId, [
"signers" => [
[
'recipientId' => '1',
'routingOrder' => '1',
'name' => 'John Snow',
'email' => 'john@snow.com',
'roleName' => 'Client'
]
]
]);
Docusign::updateEnvelope($envelopeId, array(
'status' => 'voided',
'voidedReason' => 'Just Testing'
));
Docusign::deleteEnvelope($envelopeId);
Call to undefined method Illuminate\Foundation\Application::bindShared()
A clone of tjphippen/docusign with updates and some bugs fixs
MIT