Extension for sign.me service, (*1)
Installation
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist proscom/yii2-sign-me "*"
or add, (*4)
"proscom/yii2-sign-me": "*"
to the require section of your composer.json
file., (*5)
Usage
Config application :, (*6)
'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 :, (*7)
$sign = Yii::$app->signMe;
$sign->userPhone = '+71234567890';
$file = new \proscom\signMe\File($filename, $content);
$signResult = $sign->sign($file);
$checkResult = $sign->check($file);
OR, (*8)
$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);