atanenl/signrequest

SignRequest API Client

0.8 2018-05-08 07:43 UTC

This package is not auto-updated.

Last update: 2024-04-22 08:25:11 UTC


README

Client lib for the SignRequest API

Usage

// initialize the client
$client = new \AtaneNL\SignRequest\Client('yourApiKey123');

// send a document to SignRequest
$cdr = $client->createDocument('/path/to/file', 'localReferenceToThisFile');

// define recipients
$recipient = [
	    'first_name'	  => 'John',
            'last_name'           => 'Smith',
            'email'               => 'smith@example.com',
            'verify_phone_number' => false,
            'needs_to_sign'       => true,
            'order'               => 0,
            'language'            => 'nl',
            'force_language'      => true,
            'redirect_url'        => 'http://www.example.com/thank-you-for-signing',  // redirect here after the user finished signing
        ];
$recipients = [$recipient]; // you can add as many as you need

// notify intended signers
$result = $client->sendSignRequest($cdr->uuid, 'sender@company.com', $recipients, "Please sign this");

The default language is set to dutch, change it by:

\AtaneNL\SignRequest\Client::$defaultLanguage = 'en';

Refer to the SignRequest API manual page for full options.