PHP code example of tylermenezes / legalesign-php
1. Go to this page and download the library: Download tylermenezes/legalesign-php 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/ */
tylermenezes / legalesign-php example snippets
Legalesign\Api::credentials('ffffffffffffffffffffffffffff', '000000000000000000000000000000000000000000');
return [
'userid' => 'ffffffffffffffffffffffffffffff',
'secret' => '000000000000000000000000000000000000000000'
];
Legalesign\Api::apiBase('https://eu-api.legalesign.com/api/v1');
$me = new Legalesign\Signer;
$me->firstName = 'Tyler';
$me->lastName = 'Menezes';
$me->email = '[email protected] ';
$document = Legalesign\Document::create()
->name('Waiver of Liability')
->group('mygroup')
->addSigner($me)
->sendWithTemplatePdf('mytemplate');
$document = Legalesign\Document::find($documentId);
foreach ($document->signers as $signer) {
$fields = $signer->getSignerFields();
}
[
'key' => 'value'
]
$document = Legalesign\Document::find('my-document-id');
if ($document->downloadReady) {
file_put_contents('/tmp/test.pdf', $document->getPdf());
} else {
echo 'Document is not yet ready!';
}