PHP code example of nextgi / docusign
1. Go to this page and download the library: Download nextgi/docusign library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nextgi / docusign example snippets
'providers' => array(
Tjphippen\Docusign\DocusignServiceProvider::class,
)
'aliases' => array(
'Docusign' => Tjphippen\Docusign\Facades\Docusign::class,
)
/**
* The DocuSign Integrator's Key
*/
'integrator_key' => '',
/**
* The Docusign Account Email
*/
'email' => '',
/**
* The Docusign Account Password
*/
'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);
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();
Docusign::getTemplates(array(
'folder' => 1, // String (folder name or folder ID)
'folder_ids' => '', // Comma separated list of folder ID GUIDs.
'
Docusign::getTemplate($templateId);
$envelopes = array('49d91fa5-1259-443f-85fc-708379fd7bbe', '8b2d44a-41dc-4698-9233-4be0678c345c');
Docusign::getEnvelopes($envelopes);
Docusign::getEnvelope($envelopeId);
Docusign::getEnvelopeRecipients($envelopeId);
Docusign::getEnvelopeRecipients($envelopeId, true);
Docusign::getEnvelopeCustomFields($envelopeId);
Docusign::getEnvelopeTabs($envelopeId, $recipientId);
$tabs = ['textTabs' => [['tabId' => '270269f6-4a84-4ff9-86db-2a572eb73d99', 'value' => '123 Fake Street']]];
Docusign::updateRecipientTabs($envelopeId, $recipientId, $tabs);
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' => '[email protected] ',
'roleName' => 'Contractor',
'clientUserId' => 1],
['name' => 'Jane Someone',
'email' => '[email protected] ',
'roleName' => 'Customer']),
));
Docusign::updateEnvelope($envelopeId, array(
'emailSubject' => 'New Email Subject', // Required
'emailBlurb' => 'Email message body text'
));
Docusign::createRecipientView($envelopeId, array(
'userName' => 'TJ Phippen',
'email' => '[email protected] ',
'AuthenticationMethod' => 'email',
'clientUserId' => 1, // Must create envelope with this ID
'returnUrl' => 'http://your-site.tdl/returningUrl'
));
Docusign::updateEnvelope($envelopeId, ['status' => 'sent']);
Docusign::updateEnvelope($envelopeId, array(
'status' => 'voided',
'voidedReason' => 'Just Testing'
));
Docusign::deleteEnvelope($envelopeId);
$ php artisan vendor:publish