forked from eversign/eversign-php-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocument-operations.php
More file actions
31 lines (22 loc) · 824 Bytes
/
document-operations.php
File metadata and controls
31 lines (22 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
require_once '../vendor/autoload.php';
$config = require('./config.php');
use Eversign\Client;
$client = new Client($config['accessKey'], $config['businessId']);
// Get all documents
$documents = $client->getAllDocuments();
echo sizeof($documents) . ' documents found';
// Get a single document
$document = $client->getDocumentByHash($config['documentHash']);
// download said document
$client->downloadFinalDocumentToPath($document, getcwd() . '/final.pdf', true);
$client->downloadRawDocumentToPath($document, getcwd() .'/raw.pdf');
// send a reminder for a signer
$signers = $document->getSigners();
foreach ($signers as $signer) {
$client->sendReminderForDocument($document, $signer);
}
// cancel a document
$client->cancelDocument($document);
// delete a document
$client->deleteDocument($document);