1. Go to this page and download the library: Download ylly/certsign 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/ */
$request->setOTP('0601020304'); // Will send a SMS
//$request->setOTP('[email protected]'); // Will send an Email
// Generate the order, returns the order ID
$orderId = $signator->createOrder($request);
// Send the OTP, can be reused to generate a new OTP
$signator->validate($orderId);
// Create the signature request with the documents and signature image
$signator->createRequest($request, $orderId);
// Enter OTP given by SMS or Email, will return false if the code is invalid
// Returns the signed documents
$documents = $signator->sign($orderId, 'MyOTP');
// Generate the order, returns the order ID
$orderId = $signator->createOrder($request);
// Create the signature request with the documents and signature image
$signator->createRequest($request, $orderId);
// Returns the signed documents
$documents = $signator->sign($orderId);
class Listener implement LogListenerInterface
{
public function recieve($level, $message)
{
// do something
}
}
$signator->addListener(new Listener());
$image = new Image(100, 50, new Color(255, 255, 255));
$image->setStyle(new TextStyle(0, 0, 12, 2, new Color(0, 0, 0));
$image->addText('SignText');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.