136 lines
7.3 KiB
PHP
Executable File
136 lines
7.3 KiB
PHP
Executable File
<?php
|
|
/** @var \Laravel\Lumen\Routing\Router $router */
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| 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();
|
|
//});
|
|
$router->group(['prefix' => '', 'middleware' => 'auth'], function () use ($router) {
|
|
// Helper routes
|
|
// $router->get('fixFSServicesAmounts', 'HelperController@fixFSServicesAmounts');
|
|
$router->post('update_password', 'UserController@updatePassword');
|
|
$router->get('agent_codes/{agent_code}', 'HelperController@agentCodes');
|
|
$router->get('countries', 'HelperController@countries');
|
|
$router->get('countries/{dial_code}', 'HelperController@country');
|
|
$router->post('paying_networks', 'HelperController@paying_networks');
|
|
$router->post('other_paying_networks', 'HelperController@other_paying_networks');
|
|
$router->get('init', 'HelperController@init');
|
|
|
|
// 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');
|
|
$router->post('commission', 'iLinkTransactionController@calculateCommission');
|
|
$router->get('user/{id_user}', 'iLinkTransactionController@lastUserTransactions');
|
|
$router->get('agent/{id_wallet_agent}', 'iLinkTransactionController@lastAgentTransactions');
|
|
$router->post('check_retraits', 'iLinkTransactionController@getTransactionRetrait');
|
|
$router->delete('{id_transaction}', 'iLinkTransactionController@cancel');
|
|
// Recevoir le resultat du traitement dune transacion émise vers un réseau émetteur
|
|
$router->post('receive_request_processing_result', 'iLinkTransactionController@receiveRequestProcessingResult');
|
|
});
|
|
});
|
|
|
|
// 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');
|
|
|
|
//Les historiques globals des hyperviseur et superviseur
|
|
$router->get('hyper_history/{id_network}', 'WalletController@hyperHistory');
|
|
$router->get('super_history/{agent_code}', 'WalletController@superHistory');
|
|
// Routes sans pagination
|
|
$router->get('all_hyper_history/{id_network}', 'WalletController@allHyperHistory');
|
|
$router->get('all_super_history/{agent_code}', 'WalletController@allSuperHistory');
|
|
|
|
// Wallets users iLink
|
|
$router->group(['prefix' => '/users'], function () use ($router) {
|
|
$router->get('{id_user}', 'WalletController@showWalletUser');
|
|
//Liste des operateurs
|
|
$router->get('operators/{type}/{id_wallet_network}', 'WalletController@getWalletOperators');
|
|
$router->get('banks_for_link/{id_wallet_network}', 'WalletController@getBanksInNetworkForLink');
|
|
$router->post('link_bank_account', 'WalletController@linkBankAccount');
|
|
});
|
|
});
|
|
|
|
// Idendification routes
|
|
$router->group(['prefix' => '/identifications'], function () use ($router) {
|
|
$router->post('', 'UserController@identification');
|
|
$router->put('', 'UserController@updateIdentification');
|
|
$router->post('{id_identification}', 'UserController@validateIdentification');
|
|
$router->get('{user_phone}', 'UserController@fetchIdentification');
|
|
$router->get('verify/{user_phone}', 'UserController@verifyIdentification');
|
|
$router->post('rattach_card/{id_user}', 'UserController@rattachCard');
|
|
});
|
|
|
|
// Users groups routes
|
|
$router->group(['prefix' => '/groups'], function () use ($router) {
|
|
$router->post('', 'UserGroupController@createGroup');
|
|
$router->put('', 'UserGroupController@updateGroup');
|
|
$router->post('join', 'UserGroupController@joinGroup');
|
|
$router->delete('', 'UserGroupController@deleteGroup');
|
|
$router->get('my/{code_user}', 'UserGroupController@myGroup');
|
|
$router->get('limits/{code_user}', 'UserGroupController@myGroupLimits');
|
|
|
|
// Demandes de groupes
|
|
$router->group(['prefix' => '/demands'], function () use ($router) {
|
|
$router->get('{id_demand}', 'UserGroupController@getGroupDemand');
|
|
$router->get('all/{id_user}', 'UserGroupController@getAllGroupDemand');
|
|
$router->post('validate', 'UserGroupController@validateGroupDemand');
|
|
$router->post('cancel', 'UserGroupController@cancelGroupDemand');
|
|
});
|
|
|
|
//Nano credit
|
|
$router->group(['prefix' => '/nanoCredit'], function () use ($router) {
|
|
$router->post('ask', 'NanoCreditController@askNanoCredit');
|
|
$router->post('guarantee', 'NanoCreditController@guaranteeCredit');
|
|
$router->post('refund', 'NanoCreditController@refundCredit');
|
|
$router->post('durations', 'NanoCreditController@getDurations');
|
|
$router->get('demands/{id_user}', 'NanoCreditController@getNanoCreditsDemands');
|
|
$router->get('all_demands/{id_user}', 'NanoCreditController@getAllNanoCreditsDemands');
|
|
$router->get('demands_in_progress/{id_user}', 'NanoCreditController@getNanoCreditsDemandsInProgress');
|
|
$router->get('guarantee_demands/{id_wallet_agent}', 'NanoCreditController@getGuaranteeNanoCreditsDemands');
|
|
$router->get('details/{id_demand}', 'NanoCreditController@getInfosNanoCredit');
|
|
$router->get('accounts/{id_user}', 'NanoCreditController@getNanoCreditAccount');
|
|
|
|
$router->group(['prefix' => '/savings'], function () use ($router) {
|
|
$router->post('make', 'NanoCreditController@makeSavings');
|
|
$router->post('break', 'NanoCreditController@breakSavings');
|
|
$router->get('details/{id_saving}', 'NanoCreditController@getInfosSavings');
|
|
$router->get('demands/{id_user}', 'NanoCreditController@getSavingsDemands');
|
|
$router->get('demands_in_progress/{id_user}', 'NanoCreditController@getSavingsDemandsInProgress');
|
|
});
|
|
});
|
|
});
|
|
|
|
//Notifications
|
|
$router->post('notify-new-user', 'HelperController@notifyNewUser');
|
|
|
|
//QRCode for agents
|
|
$router->get('qrcode/generate', 'QRCodeController@generate');
|
|
$router->get('qrcode/read', 'QRCodeController@read');
|
|
$router->get('qrcode/image', 'QRCodeController@image');
|
|
});
|