This is a market server for vk.com applications which processes payment notifications.
Set application credentials in app\configurations\parameters\parameters.php
.
return [
'application-id' => 42,
'application-secret' => 'fourty-two',
];
Configure database connection options in app\configurations\database\database.php
.
return [
'class' => 'yii\db\Connection',
'dsn' => 'pgsql: host=localhost; dbname=market;',
'username' => 'username',
'password' => 'password',
'charset' => 'utf8',
];
Above configuration is sufficient for the minimal working example if database schema corresponds the default models implementation. You can inspect default models for further information: DatabaseClient, DatabaseOrder and DatabaseProduct.
Both request types have their event listeners. You should place your application logic inside them:
- On product get event listener
- On order status change event listener
You are free to implement custom models and proxies for your application. Three models and three corresponding proxies are required for the application to work correctly. You must implement the following interfaces:
After implementing custom proxies you must specify them in corresponding configuration files:
app\configurations\client\proxy.php
app\configurations\order\proxy.php
app\configurations\product\proxy.php
You can also implement your custom event listeners. They will allow you to perform arbitrary actions before and after client requests. Listeners must implement the following interfaces:
After implementing custom listeners you must specify them in corresponding configuration files: