grozzzny / westgate
Westgate component for yii2 - westgate.market
Installs: 53
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: *
- yiisoft/yii2-httpclient: ~2.0.0
This package is auto-updated.
Last update: 2024-10-24 00:13:07 UTC
README
Installation guide
$ php composer.phar require grozzzny/westgate "dev-master"
Get token
Set config and token
\config\web.php
$config = [ ... 'components' => [ ... 'westgate' => [ 'class' => 'grozzzny\westgate\WestgateComponent', 'token' => 'qwertyuiop1234567890', //'itemObject' => 'main\models\ItemObject', //'categoryObject' => 'main\models\CategoryObject', //'orderObject' => 'main\models\OrderObject', ], ... ], ... ]; return $config;
Examples
List items:
$client = Yii::$app->westgate->itemIndexClient ->category($slug) ->search($search); $provider = new WestgateDataProvider(['client' => $client]);
View orders:
$client = Yii::$app->westgate->orderIndexClient->user(['email' => Yii::$app->user->identity->email]); $provider = new WestgateDataProvider(['client' => $client]);
Get inn:
$inn = Yii::$app->westgate->passportInnClient ->passportParams($fio, $birthdate, $docnum, $docdt, $dcode) ->send();