The preferred way to install this extension is through composer.
Either run
composer require sevenfloor/api-i-digital:dev-master
or add
"sevenfloor/api-i-digital": "dev-master"
to the require section of your composer.json
file.
Add this to your main configuration's components array:
'sms' => function () {
$component = new \sevenfloor\apiidigital\Client('base_uri');
$component->node_id = 'node_id';
$component->password = 'password';
return $component;
},
$sms = \Yii::$app->smsnew;
$body = new \sevenfloor\apiidigital\Body(\sevenfloor\apiidigital\Body::TYPE_TEXT, 'test');
// send message
var_dump($sms->message($body, 'source_name', 'desctination'));
// receive status
var_dump($sms->receive());