walletservice/routes/web.php

63 lines
2.4 KiB
PHP
Executable File

<?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();
//});
// Helper routes
$router->get('countries','HelperController@countries');
$router->get('countries/{dial_code}','HelperController@country');
$router->get('paying_networks/{id_country}','HelperController@paying_networks');
// Transactions routes
$router->group(['prefix' => '/transactions'] , function () use ($router){
$router->post('','TransactionController@add');
$router->get('{id_wallet}','TransactionController@lastTransactions');
$router->post('commission','TransactionController@calculateCommission');
$router->delete('{id_transaction}','TransactionController@cancel');
// Transactions wallet ilink
$router->group(['prefix' => '/ilink'] , function () use ($router){
$router->post('','iLinkTransactionController@add');
});
});
// Credits routes
$router->group(['prefix' => '/credits'] , function () use ($router){
$router->put('treatDemand/{id_demand}','CreditController@treatDemand');
$router->put('cancelDemand/{id_demand}','CreditController@cancelDemand');
});
$router->put('/virement/{id_wallet}','CommissionController@virement');
// Wallets routes
$router->group(['prefix' => '/wallets'] , function () use ($router){
$router->get('{id_agent}/activated', 'WalletController@activated');
$router->get('{id_wallet}', 'WalletController@show');
$router->post('', 'WalletController@create');
// Wallets users iLink
$router->group(['prefix' => '/users'] , function () use ($router){
$router->get('{id_user}', 'WalletController@showWalletUser');
});
});
// Idendification routes
$router->group(['prefix' => '/identifications'] , function () use ($router){
$router->post('','UserController@identification');
$router->post('{id_identification}','UserController@validateIdentification');
$router->get('{user_phone}','UserController@fetchIdentification');
$router->get('verify/{user_phone}','UserController@verifyIdentification');
});