Extension for sign.me service
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist proscom/yii2-sign-me "*"
or add
"proscom/yii2-sign-me": "*"
to the require section of your composer.json
file.
Config application :
'components' => [
// ...
'signMe' => [
'class' => SignMe::className(),
'apiKey' => 'SIGNME_API_KEY',
'pathToCertificate' => 'path/to/certificate',
],
]
Once the extension is installed, simply use it in your code by :
$sign = Yii::$app->signMe;
$sign->userPhone = '+71234567890';
$file = new \proscom\signMe\File($filename, $content);
$signResult = $sign->sign($file);
$checkResult = $sign->check($file);
OR
$sign = new \proscom\signMe\SignMe([
'apiKey' => 'SIGNME_API_KEY',
'userPhone' => '+71234567890',
'pathToCertificate' => 'path/to/certificate'
]);
$file = new \proscom\signMe\File($filename, $content);
$signResult = $sign->sign($file);
$checkResult = $sign->check($file);