2020-04-15 23:08:09 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Application Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Here is where you can register all of the routes for an application.
|
|
|
|
| It is a breeze. Simply tell Lumen the URIs it should respond to
|
|
|
|
| and give it the Closure to call when that URI is requested.
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
//$router->get('/', function () use ($router) {
|
|
|
|
// return $router->app->version();
|
|
|
|
//});
|
|
|
|
|
2020-04-25 11:41:40 +00:00
|
|
|
// Transactions routes
|
|
|
|
$router->group(['prefix' => '/transactions'] , function () use ($router){
|
|
|
|
$router->post('','TransactionController@add');
|
|
|
|
$router->get('{id_wallet}','TransactionController@lastTransactions');
|
2020-05-02 14:43:28 +00:00
|
|
|
$router->post('commission','TransactionController@calculateCommission');
|
2020-06-08 18:52:58 +00:00
|
|
|
$router->delete('{id_transaction}','TransactionController@cancel');
|
2020-04-25 11:41:40 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
// Credits routes
|
|
|
|
$router->group(['prefix' => '/credits'] , function () use ($router){
|
|
|
|
$router->put('treatDemand/{id_demand}','CreditController@treatDemand');
|
2020-04-27 13:13:15 +00:00
|
|
|
$router->put('cancelDemand/{id_demand}','CreditController@cancelDemand');
|
2020-04-25 11:41:40 +00:00
|
|
|
});
|
|
|
|
|
2020-04-27 13:13:15 +00:00
|
|
|
$router->put('/virement/{id_wallet}','CommissionController@virement');
|
2020-04-15 23:08:09 +00:00
|
|
|
|
|
|
|
// Wallets routes
|
|
|
|
$router->group(['prefix' => '/wallets'] , function () use ($router){
|
2020-04-17 15:26:12 +00:00
|
|
|
$router->get('{id_agent}/activated', 'WalletController@activated');
|
|
|
|
$router->get('{id_wallet}', 'WalletController@show');
|
2020-04-21 14:07:57 +00:00
|
|
|
$router->post('', 'WalletController@create');
|
2020-06-01 18:31:25 +00:00
|
|
|
|
|
|
|
// Wallets users iLink
|
|
|
|
$router->group(['prefix' => '/users'] , function () use ($router){
|
|
|
|
$router->get('{id_user}', 'WalletController@showWalletUser');
|
|
|
|
});
|
2020-04-15 23:08:09 +00:00
|
|
|
});
|
2020-06-01 18:31:25 +00:00
|
|
|
|
2020-06-11 13:42:35 +00:00
|
|
|
// Idendification routes
|
|
|
|
$router->group(['prefix' => '/identifications'] , function () use ($router){
|
|
|
|
$router->post('','UserController@identification');
|
|
|
|
$router->post('{id_identification}','UserController@validateIdentification');
|
2020-06-12 06:11:11 +00:00
|
|
|
$router->get('{user_code}','UserController@fetchIdentification');
|
|
|
|
$router->get('verify/{id_user}','UserController@verifyIdentification');
|
2020-06-11 13:42:35 +00:00
|
|
|
});
|
|
|
|
|