Download the PHP package eversign/eversign-php-sdk without Composer
On this page you can find all versions of the php package eversign/eversign-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download eversign/eversign-php-sdk
More information about eversign/eversign-php-sdk
Files in eversign/eversign-php-sdk
Package eversign-php-sdk
Short Description The official PHP SDK Wrapper for the Eversign API
License MIT
Rated 5.00 based on 1 reviews
Informations about the package eversign-php-sdk
eversign PHP SDK
eversign PHP SDK is the official PHP Wrapper around the eversign API.
Quick Links:
- Create Document Example
- Use Template Example
- Document Operations
- Create Iframe Signature
- Create Iframe Signature From Template
- OAuth Flow (start)
- OAuth Flow (callback)
Requirements
- The latest version of the SDK requires PHP version 7.1 or higher.
- Installation via Composer is recommended
Installation
-
Install Composer if you haven't already
-
Add the eversign PHP SDK as a dependency using the composer.phar CLI:
or add it directly to your composer.json
- After installing, you need to require Composer's autoloader
Usage
All eversign API requests are made using the Eversign\Client
class, which contains all methods for creating, retrieving and saving documents. This class must be initialized with your API access key string. Where is my API access key?
Please also specify the ID of the eversign business you would like this API request to affect. Where is my Business ID?
Fetch businesses
Using the getBusinesses()
function all businesses on the eversign account will be fetched and listed along with their Business IDs.
If you know the businessId
beforehand you can also set it with setSelectedBusinessById(businessId)
Create document from template [Method: Use Template]
To create a document based on an already created template you can use the class Eversign\DocumentTemplate
. In order to identify which template should be used, please pass the template's ID into the setTemplateId("MY_TEMPLATE_ID")
function.
Additionally, setTitle()
and setMessage()
can be used to set a title and message for the newly created document.
Fill signing roles [Method: Use Template]
A template's signing and CC roles are filled just using the functions below. Each role is identified using the setRole()
function, must carry a name and email address and is appended to the document using the appendSigner()
function.
Saving the document object [Method: Use Template]
Your document object can now be saved using the createDocumentFromTemplate()
function. Once this function has been called successfully, your document is created and the signing process is started.
Creating a document [Method: Create Document]
A document is created by instantiating the Eversign\Document
object and setting your preferred document properties. There is a series of set
methods available used to specify options for your document. All available methods can be found inside our extensive Create Document Example.
Adding signers to a document [Method: Create Document]
Signers are added to an existing document object by instantiating the Eversign\Signer
object and appending each signer to the document object. Each signer object needs to come with a Signer ID, which is later used to assign fields to the respective signer. If no Signer ID is specified, the appendSigner()
method will set a default incremented Signer ID. Each signer object also must contain a name and email address and is appended to the document using the appendSigner()
method.
Adding recipients (CCs) to a document [Method: Create Document]
Recipients (CCs) are added by instantiating the Eversign\Recipient
object and appending each recipient to the document object. Just like signers, recipients must carry a name and email address.
Adding files to the Document [Method: Create Document]
Files are added to a document by instantiating an Eversign\File
object. The standard way of choosing a file to upload is appending the file's path using the setFilePath()
method and then appending your file using the appendFile()
method.
Uploading a file is mandatory without which the createDocument method will fail. As an alternative you may upload a blank PDF and add 'note' or 'text' field types.
Adding fields [Method: Create Document]
There is a number of fields that can be added to a document, each coming with different options and parameters. (View Full list of fields »)
A field is appended to the document using the appendFormField($signatureField, $fileIndex)
method. The first function parameter is the field object, and the second parameter must contain the index of the file it should be added to. If your field should be placed onto the first uploaded file, set this parameter to 0
. This parameter also default to 0
.
Signature and Initials fields are required to be assigned to a specific signer. Fields are assigned to a signer by passing the Signer ID into the setSigner()
function.
A full example containing instructions and methods for each available field type can be found here: Create Document Example
Available field types
Please find below all available field types:
Field Type | Class |
---|---|
date_signed | Eversign\DateSignedField |
signature | Eversign\SignatureField |
initials | Eversign\InitialsField |
note | Eversign\NoteField |
text | Eversign\TextField |
checkbox | Eversign\CheckboxField |
radio | Eversign\RadioField |
dropdown | Eversign\DropdownField |
attachment | Eversign\AttachmentField |
Saving a document [Method: Create Document]
A document is saved and sent out by passing the final document object into the createDocument
method. The API will return the entire document object array in response.
Loading a document
Class: Document
A document is loaded by passing its document hash into the getDocumentByHash()
method.
Downloading the raw or final document
Class: Client
A document can be downloaded either in its raw or in its final (completed) state. In both cases, the respective method must contain the document object and a path to save the PDF document to. When downloading a final document, you can choose to attach the document's Audit Trail by setting the third parameter to true
.
Get a list of documents or templates
Class: Client
The Client class is also capable fo listing all available documents templates based on their status. Each method below returns an array of document objects.
Delete or cancel a document
Class: Client
A document is cancelled or deleted using the methods below.
Contact us
Any feedback? Please feel free to contact our support team.
Development
All versions of eversign-php-sdk with dependencies
guzzlehttp/guzzle Version ^6.2.3|^7.0.0
jms/serializer Version ^1.6.2|^3.12.0
doctrine/annotations Version ^1.9