286 lines
14 KiB
PHP
Executable File
286 lines
14 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.
|
|
|
|
|
*/
|
|
/*
|
|
* Helpers routes
|
|
*/
|
|
$router->get('/geocode', 'HelperController@getGoogleGeocoding');
|
|
//$router->get('/', function () use ($router) {
|
|
// return $router->app->version();
|
|
//});
|
|
$router->post('/logout',['uses'=>'AccessTokenController@logout','middleware' => 'auth:api']);
|
|
|
|
/**
|
|
* Routes for MobileBackend
|
|
*/
|
|
$router->group(['prefix' => '/mobilebackend/interacted' , 'middleware' => 'auth:api'], function () use ($router){
|
|
|
|
$router->post('LoginAction', 'MobileBackendController@action');
|
|
$router->post('BalanceAction', 'MobileBackendController@action');
|
|
$router->post('ConfigAction', 'MobileBackendController@action');
|
|
$router->post('DemandeAction', 'MobileBackendController@action');
|
|
$router->post('MembersAction', 'MobileBackendController@action');
|
|
$router->post('LocationAction', 'MobileBackendController@action');
|
|
$router->post('NetworkAction', 'MobileBackendController@action');
|
|
$router->post('WalletAction', 'MobileBackendController@action');
|
|
|
|
});
|
|
|
|
/**
|
|
* Routes for MobileBackendTest
|
|
*/
|
|
$router->group(['prefix' => '/mobilebackendtest/interacted'], function () use ($router){
|
|
|
|
$router->post('LoginAction', 'MobileBackendTestController@action');
|
|
$router->post('MembersAction', 'MobileBackendTestController@action');
|
|
|
|
$router->group(['middleware' => 'auth:api'], function () use ($router){
|
|
$router->post('BalanceAction', 'MobileBackendTestController@action');
|
|
$router->post('ConfigAction', 'MobileBackendTestController@action');
|
|
$router->post('DemandeAction', 'MobileBackendTestController@action');
|
|
$router->post('LocationAction', 'MobileBackendTestController@action');
|
|
$router->post('NetworkAction', 'MobileBackendTestController@action');
|
|
$router->post('WalletAction', 'MobileBackendTestController@action');
|
|
});
|
|
});
|
|
/**
|
|
* Open routes for Wallet service
|
|
*/
|
|
|
|
$router->group(['prefix' => '/'.config('services.wallet_service.name')], function () use ($router) {
|
|
// Users groups routes
|
|
$router->group(['prefix' => '/groups'], function () use ($router) {
|
|
// Demandes de groupes
|
|
$router->group(['prefix' => '/demands'], function () use ($router) {
|
|
$router->get('{id_demand}', 'WalletServiceController@get');
|
|
});
|
|
});
|
|
});
|
|
|
|
/**
|
|
* Routes for Wallet Service
|
|
*/
|
|
$router->group(['prefix' => '/'.config('services.wallet_service.name') ,'middleware' => 'auth:api'], function () use ($router){
|
|
// Helper routes
|
|
$router->post('update_password', 'WalletServiceController@post');
|
|
$router->get('countries','WalletServiceController@get');
|
|
$router->get('countries/{dial_code}','WalletServiceController@get');
|
|
$router->post('paying_networks','WalletServiceController@post');
|
|
$router->post('other_paying_networks','WalletServiceController@post');
|
|
|
|
// Transactions routes
|
|
$router->group(['prefix' => '/transactions'] , function () use ($router){
|
|
$router->post('','WalletServiceController@post');
|
|
$router->get('{id_wallet}','WalletServiceController@get');
|
|
$router->post('commission','WalletServiceController@post');
|
|
$router->delete('{id_transaction}','WalletServiceController@delete');
|
|
|
|
// Transactions wallet ilink
|
|
$router->group(['prefix' => '/ilink'] , function () use ($router){
|
|
$router->post('','WalletServiceController@post');
|
|
$router->post('commission','WalletServiceController@post');
|
|
$router->get('user/{id_user}','WalletServiceController@get');
|
|
$router->get('agent/{id_wallet_agent}','WalletServiceController@get');
|
|
$router->post('check_retraits','WalletServiceController@post');
|
|
});
|
|
});
|
|
|
|
// Credits routes
|
|
$router->group(['prefix' => '/credits'] , function () use ($router){
|
|
$router->put('treatDemand/{id_demand}','WalletServiceController@put');
|
|
$router->put('cancelDemand/{id_demand}','WalletServiceController@put');
|
|
});
|
|
|
|
$router->put('/virement/{id_wallet}','WalletServiceController@put');
|
|
|
|
// Wallets routes
|
|
$router->group(['prefix' => '/wallets'] , function () use ($router){
|
|
$router->get('{id_agent}/activated', 'WalletServiceController@get');
|
|
$router->get('{id_wallet}', 'WalletServiceController@get');
|
|
$router->post('', 'WalletServiceController@post');
|
|
|
|
//Les historiques globals des hyperviseur et superviseur
|
|
$router->get('hyper_history/{id_network}', 'WalletServiceController@get');
|
|
$router->get('super_history/{agent_code}', 'WalletServiceController@get');
|
|
// Routes sans pagination
|
|
$router->get('all_hyper_history/{id_network}', 'WalletServiceController@get');
|
|
$router->get('all_super_history/{agent_code}', 'WalletServiceController@get');
|
|
|
|
// Wallets users iLink
|
|
$router->group(['prefix' => '/users'] , function () use ($router){
|
|
$router->get('{id_user}', 'WalletServiceController@get');
|
|
//Liste des operateurs
|
|
$router->get('operators/{type}/{id_wallet_network}', 'WalletServiceController@get');
|
|
$router->get('banks_for_link/{id_wallet_network}', 'WalletServiceController@get');
|
|
$router->post('link_bank_account', 'WalletServiceController@post');
|
|
});
|
|
});
|
|
|
|
// Idendification routes
|
|
$router->group(['prefix' => '/identifications'] , function () use ($router){
|
|
$router->post('','WalletServiceController@post');
|
|
$router->put('','WalletServiceController@put');
|
|
$router->post('{id_identification}','WalletServiceController@postWithFiles');
|
|
$router->get('{user_phone}','WalletServiceController@get');
|
|
$router->get('verify/{user_phone}','WalletServiceController@get');
|
|
$router->post('rattach_card/{id_user}', 'WalletServiceController@post');
|
|
});
|
|
|
|
// Users groups routes
|
|
$router->group(['prefix' => '/groups'], function () use ($router) {
|
|
$router->post('', 'WalletServiceController@post');
|
|
$router->put('', 'WalletServiceController@put');
|
|
$router->post('join', 'WalletServiceController@post');
|
|
$router->delete('', 'WalletServiceController@delete');
|
|
$router->get('my/{code_user}', 'WalletServiceController@get');
|
|
$router->get('limits/{code_user}', 'WalletServiceController@get');
|
|
|
|
// Demandes de groupes
|
|
$router->group(['prefix' => '/demands'], function () use ($router) {
|
|
// $router->get('{id_demand}', 'WalletServiceController@get');
|
|
$router->get('all/{id_user}', 'WalletServiceController@get');
|
|
$router->post('validate', 'WalletServiceController@post');
|
|
$router->post('cancel', 'WalletServiceController@post');
|
|
});
|
|
|
|
//Nano credit
|
|
$router->group(['prefix' => '/nanoCredit'], function () use ($router) {
|
|
$router->post('ask', 'WalletServiceController@post');
|
|
$router->post('guarantee', 'WalletServiceController@post');
|
|
$router->post('refund', 'WalletServiceController@post');
|
|
$router->post('durations', 'WalletServiceController@post');
|
|
$router->get('demands/{id_user}', 'WalletServiceController@get');
|
|
$router->get('all_demands/{id_user}', 'WalletServiceController@get');
|
|
$router->get('demands_in_progress/{id_user}', 'WalletServiceController@get');
|
|
$router->get('guarantee_demands/{id_wallet_agent}', 'WalletServiceController@get');
|
|
$router->get('details/{id_demand}', 'WalletServiceController@get');
|
|
$router->get('accounts/{id_user}', 'WalletServiceController@get');
|
|
|
|
$router->group(['prefix' => '/savings'], function () use ($router) {
|
|
$router->post('make', 'WalletServiceController@post');
|
|
$router->post('break', 'WalletServiceController@post');
|
|
$router->get('details/{id_saving}', 'WalletServiceController@get');
|
|
$router->get('demands/{id_user}', 'WalletServiceController@get');
|
|
$router->get('demands_in_progress/{id_user}', 'WalletServiceController@get');
|
|
});
|
|
});
|
|
|
|
});
|
|
|
|
// QRCode for users
|
|
$router->get('qrcode/read', 'WalletServiceController@get');
|
|
$router->get('qrcode/image', 'WalletServiceController@get');
|
|
//User
|
|
$router->post('agents', 'WalletServiceController@post');
|
|
});
|
|
|
|
/**
|
|
* Routes for Notification Service
|
|
*/
|
|
$router->group(['prefix' => '/'.config('services.notification_service.name')], function () use ($router){
|
|
// OneSingal routes
|
|
$router->group(['prefix'=>'/onesignal'], function () use ($router) {
|
|
$router->post('saveUser', 'NotificationServiceController@post');
|
|
$router->post('saveAgent', 'NotificationServiceController@post');
|
|
});
|
|
|
|
// $router->group(['prefix'=>'/notifications' , 'middleware' => 'auth:api'], function () use ($router) {
|
|
$router->group(['prefix'=>'/notifications'], function () use ($router) {
|
|
$router->post('', 'NotificationServiceController@post');
|
|
$router->put('update/{id_notif}', 'NotificationServiceController@put');
|
|
});
|
|
|
|
});
|
|
|
|
/**
|
|
* Routes for NanoSante Service
|
|
*/
|
|
$router->group(['prefix' => '/'.config('services.nano_sante_service.name')], function () use ($router){
|
|
// $router->get('pdf-viewer', 'NanoSanteServiceController@getOriginal');
|
|
|
|
$router->group(['middleware' => 'auth:api'], function () use ($router){
|
|
// Insurances routes
|
|
$router->group(['prefix' => '/insurances'], function () use ($router) {
|
|
$router->get('', 'NanoSanteServiceController@get');
|
|
$router->get('networks', 'NanoSanteServiceController@get');
|
|
$router->put('{id}/add-beneficiaries', 'NanoSanteServiceController@put');
|
|
$router->put('{id}/delete-beneficiaries', 'NanoSanteServiceController@put');
|
|
$router->put('{id}/stop', 'NanoSanteServiceController@put');
|
|
$router->put('{id}/renew', 'NanoSanteServiceController@put');
|
|
|
|
// Subscriptions $router->put('{id}/stop', 'InsuranceController@stopInsurance');
|
|
|
|
$router->group(['prefix' => '/subscriptions'], function () use ($router) {
|
|
$router->post('bonus-amount', 'NanoSanteServiceController@post');
|
|
$router->post('upload-images', 'NanoSanteServiceController@postWithFiles');
|
|
$router->post('', 'NanoSanteServiceController@post');
|
|
// $router->put('{id}/validate', 'NanoSanteServiceController@put');
|
|
// $router->put('{id}/reject', 'NanoSanteServiceController@put');
|
|
$router->put('{id}/pay', 'NanoSanteServiceController@put');
|
|
$router->get('', 'NanoSanteServiceController@get');
|
|
});
|
|
|
|
// Factures
|
|
$router->group(['prefix' => '/invoices'], function () use ($router) {
|
|
$router->get('', 'NanoSanteServiceController@get');
|
|
$router->put('{id}/pay', 'NanoSanteServiceController@put');
|
|
});
|
|
});
|
|
|
|
// Insurances routes
|
|
$router->group(['prefix' => '/insured'], function () use ($router) {
|
|
//Search
|
|
$router->get('', 'NanoSanteServiceController@get');
|
|
});
|
|
|
|
$router->get('drugs-and-devices', 'NanoSanteServiceController@get');
|
|
$router->post('drugs-and-devices', 'NanoSanteServiceController@post');
|
|
$router->get('provider-classes', 'NanoSanteServiceController@get');
|
|
$router->get('acts', 'NanoSanteServiceController@get');
|
|
|
|
$router->get('health-care-sheets', 'NanoSanteServiceController@get');
|
|
$router->post('health-care-sheets/check-insurance-coverage-amount', 'NanoSanteServiceController@post');
|
|
$router->put('health-care-sheets', 'NanoSanteServiceController@put');
|
|
$router->post('health-care-sheets/performances-amount', 'NanoSanteServiceController@post');
|
|
$router->post('health-care-sheets/consultation', 'NanoSanteServiceController@post');
|
|
$router->post('health-care-sheets/execution', 'NanoSanteServiceController@post');
|
|
$router->get('health-care-sheets/{id}', 'NanoSanteServiceController@get');
|
|
$router->put('health-care-sheets/{id}', 'NanoSanteServiceController@put');
|
|
|
|
$router->get('generate-invoice', 'NanoSanteServiceController@get');
|
|
$router->get('invoices', 'NanoSanteServiceController@get');
|
|
|
|
$router->get('authorizations-care-requests', 'NanoSanteServiceController@get');
|
|
$router->post('authorizations-care-requests', 'NanoSanteServiceController@post');
|
|
|
|
$router->get('exclusions/{network_id}', 'NanoSanteServiceController@get');
|
|
$router->post('password-validation', 'NanoSanteServiceController@post');
|
|
});
|
|
});
|
|
|
|
/**
|
|
* Routes for Payment Service
|
|
*/
|
|
$router->group(['prefix' => '/'.config('services.payment_service.name')], function () use ($router){
|
|
$router->get('methods', 'PaymentServiceController@get');
|
|
});
|
|
|
|
/**
|
|
* Routes for public simulator on website
|
|
*/
|
|
$router->group(['prefix' => '/simulator'], function () use ($router){
|
|
$router->get('countries','SimulatorServiceController@get');
|
|
$router->post('paying_networks', 'SimulatorServiceController@post');
|
|
$router->post('other_paying_networks', 'SimulatorServiceController@post');
|
|
$router->post('transactions/ilink/commission','SimulatorServiceController@post');
|
|
});
|