PHP code example of transloyd / service-esign

1. Go to this page and download the library: Download transloyd/service-esign 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/ */

    

transloyd / service-esign example snippets

`
public function __constructor( ..., GuzzleHttp\Client $client){

...

    $this->provider = new Provider($client, new GuzzleMessageFactory());

...

}

...

$documentInBase64 = BASE_64_HASH;
$keyDataInBase64 = BASE_64_HASH;
$keyPass = $_POST['keyPass'];

$eSign = new ESign($this->provider);
$eSignManager = new ESignManager($eSign);

$signedDocumentRaw = $eSignManager->getSignedDocumentRaw($documentInBase64, $keyDataInBase64, $keyPass);
$signedDocument = base64_decode($signedDocumentRaw);

return $signedDocument;