Skip to content

This is a demo client in PHP to demonstrate the usage of the signhost api using PHP.

Notifications You must be signed in to change notification settings

Evidos/signhost-phpdemoclient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Signhost client library

This is a client library in PHP to demonstrate the usage of the signhost api using PHP. You will need a valid APPKey and APIKey. You can request a APPKey for signhost at ondertekenen.nl.

<?php
require_once("signhost.php");

$client = new SignHost("AppName appkey", "apikey");

$createResponse = $client->CreateTransaction(CreateSampleTransaction());
if ($createResponse->IsSuccess) {
	$transaction = json_decode($createResponse->Content);

	$client->AddOrReplaceFile($transaction->Id, "First Document", "PathToFile");
	$client->AddOrReplaceFile($transaction->Id, "General Agreement", "PathOtherFile");

	# When everything is setup we can start the transaction flow
	$client->StartTransaction($transaction->Id);
}

function CreateSampleTransaction() {
	$scribbleVerification = new ScribbleVerification();
	$scribbleVerification->ScribbleName = "John Doe";

	$signer = new Signer("john.doe@example.com");
	$signer->SignRequestMessage = "Could you please sign this document?";
	$signer->SendSignRequest = true;
	$signer->Verifications = array($scribbleVerification);

	$transaction = new Transaction();
	$transaction->Signers = array($signer);

	return $transaction;
}

About

This is a demo client in PHP to demonstrate the usage of the signhost api using PHP.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages