walletservice/routes/web.php

111 lines
5.4 KiB
PHP
Raw Normal View History

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();
//});
// Helper routes
$router->get('countries','HelperController@countries');
2020-06-21 21:49:24 +00:00
$router->get('countries/{dial_code}','HelperController@country');
$router->post('paying_networks','HelperController@paying_networks');
$router->post('other_paying_networks','HelperController@other_paying_networks');
2020-06-25 16:54:46 +00:00
$router->get('init','HelperController@init');
2020-04-15 23:08:09 +00:00
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');
// Transactions wallet ilink
$router->group(['prefix' => '/ilink'] , function () use ($router){
$router->post('','iLinkTransactionController@add');
2020-06-24 07:36:54 +00:00
$router->post('commission','iLinkTransactionController@calculateCommission');
$router->get('user/{id_wallet_user}','iLinkTransactionController@lastUserTransactions');
$router->get('agent/{id_wallet_agent}','iLinkTransactionController@lastAgentTransactions');
2020-07-01 17:54:12 +00:00
$router->post('check_retraits','iLinkTransactionController@getTransactionRetrait');
2020-07-17 13:48:50 +00:00
$router->delete('{id_transaction}','iLinkTransactionController@cancel');
});
2020-04-25 11:41:40 +00:00
});
// Credits routes
$router->group(['prefix' => '/credits'] , function () use ($router){
$router->put('treatDemand/{id_demand}','CreditfController@treatDemand');
$router->put('cancelDemand/{id_demand}','CreditController@cancelDemand');
2020-04-25 11:41:40 +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){
$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->put('', 'UserController@updateIdentification');
$router->post('{id_identification}', 'UserController@validateIdentification');
$router->get('{user_phone}', 'UserController@fetchIdentification');
$router->get('verify/{user_phone}', 'UserController@verifyIdentification');
2020-06-30 03:41:20 +00:00
$router->post('rattach_card/{id_user}', 'UserController@rattachCard');
2020-06-11 13:42:35 +00:00
});
// Users groups routes
$router->group(['prefix' => '/groups'], function () use ($router) {
2020-08-17 12:22:40 +00:00
$router->post('', 'UserGroupController@createGroup');
$router->put('', 'UserGroupController@updateGroup');
$router->post('join', 'UserGroupController@joinGroup');
$router->delete('', 'UserGroupController@deleteGroup');
2020-08-18 14:58:27 +00:00
$router->get('my/{code_user}', 'UserGroupController@myGroup');
2020-08-24 16:29:50 +00:00
$router->get('limits/{code_user}', 'UserGroupController@myGroupLimits');
2020-08-11 07:49:13 +00:00
// Demandes de groupes
2020-08-11 07:49:13 +00:00
$router->group(['prefix' => '/demands'], function () use ($router) {
2020-08-17 12:22:40 +00:00
$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');
2020-08-31 13:54:10 +00:00
$router->post('guarantee', 'NanoCreditController@guaranteeCredit');
$router->post('refund', 'NanoCreditController@refundCredit');
$router->post('durations', 'NanoCreditController@getDurations');
$router->get('demands/{id_user}', 'NanoCreditController@getNanoCreditsDemands');
2020-10-02 15:55:56 +00:00
$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');
2020-08-31 13:54:10 +00:00
$router->get('details/{id_demand}', 'NanoCreditController@getInfosNanoCredit');
$router->get('accounts/{id_user}', 'NanoCreditController@getNanoCreditAccount');
2020-08-31 13:54:10 +00:00
$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');
2020-10-02 15:55:56 +00:00
$router->get('demands_in_progress/{id_user}', 'NanoCreditController@getSavingsDemandsInProgress');
2020-08-31 13:54:10 +00:00
});
2020-08-11 07:49:13 +00:00
});
});