Client for api zagruzka.com

Client for api zagruzka.com

Latest Stable Version Total Downloads Latest Unstable Version License composer.lock available

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist sevenfloor/yii2-zagruzka "*"

or add

"sevenfloor/yii2-zagruzka": "*"

to the require section of your composer.json file.

Usage

Add this to your main configuration's components array:

'clientZagruzka' => [
            'class' => \sevenfloor\zagruzka\ClientZagruzka::className() ,
            'url' => 'zagruzka.url',
            'login' => 'your_login',
            'pass' => 'your_password',
            'urlCallback' => 'partner.url'
        ],

Typical component usage

Yii::$app->clientZagruzka->pay(phone, sum);
Yii::$app->clientZagruzka->balance();