• File: api.php~
  • Full Path: /var/www/imaliapitest/routes/api.php~
  • Date Modified: 05/19/2025 4:29 PM
  • File size: 32.1 KB
  • MIME-type: text/x-php
  • Charset: utf-8
<?php

use App\Bank\Payment;
use App\Classes\GenerateImaliAccount;
use App\Classes\SendSMSSislog;
use App\Classes\TransactionGeneration;
use App\DayCloseStore;
use App\Http\Controllers\Partner\BimController;
use App\Http\Controllers\ServiceConfigAccountController;
use App\Http\Controllers\ServiceConfigController;
use App\Http\Controllers\SmsController;
use App\Http\Controllers\TypeServiceController;
use App\Imali\ImaliAccount;
use App\Imali\MerchantAccount;
use App\PurchaseVoucher;
use App\Store;
use App\StoreConfig;
use App\StoreDevice;
use Illuminate\Http\Request;
use \Maatwebsite\Excel\Facades\Excel;
use App\Http\Controllers\TopUpTestController;
use App\Http\Controllers\TopUpController;
use App\Http\Controllers\Api\AdminController;
use App\Http\Controllers\StoreController;
use App\Http\Controllers\LogController;
use App\Http\Controllers\CloseController;
use App\Http\Controllers\PaymentController;
use App\Http\Controllers\UserClientController;
use App\Http\Controllers\ComercianteController;
use App\Http\Controllers\MerchantController;
use App\Http\Controllers\DashboardTopUp;
use App\Http\Controllers\TransactionHistoryController;
use App\Http\Controllers\StoreDeviceController;
use App\Http\Controllers\RefundController;
use App\Http\Controllers\StoreConfigController;
use App\Http\Controllers\StatistiController;
use App\Http\Controllers\UserController;
use App\Http\Controllers\UssdController;
use App\Http\Controllers\VoucherHistoryController;


Route::get('top-up-dashboard', [DashboardTopUp::class, 'getDashboard']);
Route::get('get-transaction-histories/{accountNumber}/{date1}/{date2}', [TransactionHistoryController::class, 'getExtrato']);


Route::get('user-extrato', [PaymentController::class, 'getExtrato']);

Route::get('get-report', [StatistiController::class, 'getWeekReport']);

Route::post('send-sms', [SmsController::class, 'sendSms']);


// USSD
Route::prefix('ussd')->group(function () {

    Route::get('balance/{phone}', 'UserController@getBalance');
    Route::get('check-phone/{phone}', 'Sislog\UssdController@checkPhone');
    Route::get('check-imali-account/{account_number}/{phone}', 'Sislog\UssdController@checkImaliAccount');
    Route::get('get-store-transactions/{phone}', [UssdController::class, 'getTransactions']);

});


Route::get('fcm', 'FcmController@sendNotification');

// USER CLIENT SESSION
//Route::post('save-token', 'UserClientController@saveToken');
Route::post('save-token', [UserClientController::class, 'saveToken']);
Route::post('save-client-integrator', [UserClientController::class, 'saveClientIntegrator']);
//Route::post('save-client-integrator', 'UserClientController@saveClientIntegrator');
Route::get('get-clients', 'UserClientController@getClients');
// AND USER CLIENT TEST

Route::get('get-pedido/{id}/{client_id}', 'MoneyRequestController@getPedido');
Route::get('get-client-test', 'TopUpTestController@getDstvProducts');
Route::get('check-client-start-test/{smartCard}', [TopUpTestController::class, 'checkClientStartTimes']);
Route::post('pay-startimes-test', [TopUpTestController::class, 'payStartTimesPackage']);



// GET-TRANSACTION
Route::get('check-transaction/{id}', [UserClientController::class, 'checkTransactionStatus']);
Route::get('get-lang', [UserClientController::class, 'getLang'])->middleware('localization');

Route::middleware(['auth:sanctum', 'localization'])->prefix('apps')->group(function () {

//    Route::get('make-recharge', 'Partner\BimController@makeRecharge');
    Route::post('make-recharge', [BimController::class, 'makeRecharge']);



    Route::get('check-reference', 'Partner\BimController@verificarEntidadeReferencia');


});


Route::middleware(['auth:sanctum', 'localization'])->prefix('partner')->group(function () {

    // GET-TRANSACTION
    Route::get('get-transaction/{id}', [UserClientController::class, 'getTransaction']);

    // GET-TRANSACTION
    Route::get('check-transaction/{id}', [UserClientController::class, 'checkTransactionStatus']);

    // GENERATE TRANSACTION
    Route::post('generate-transaction', [UserClientController::class, 'Qrcode']); // funciona

    // GET STATIC QRCODE
    Route::get('get-qrcode/{accountNumber}', [UserClientController::class, 'getStoreQrcode']); // funciona

    // GENERATE PAYMENT
    Route::post('generate-payment', [UserClientController::class, 'generatePayment']); // funciona

    // CONFIRM PAYMENT
    Route::post('confirm-payment', [UserClientController::class, 'makePayment']); // funciona



    // get Store Payments REFUBNDD
    Route::get('get-store-payments-refunds/{accountNumber}', [UserClientController::class, 'getRefunds']);


    // REFUND CUSTOMER
    Route::post('refund-customer', [UserClientController::class, 'refundCustomerNew']);
    Route::post('refund-confirmation', [UserClientController::class, 'confirmRefund']);

    // get Store Payments
    Route::get('get-store-payments/{accountNumber}', [UserClientController::class, 'getStorePayments']);

    // get Generated Payments
    Route::get('get-generated-payments/{accountNumber}', [UserClientController::class, 'getGeneratedPayments']);
});




Route::get('make-recharge', 'Partner\BimController@makeRecharge');
Route::get('check-reference', 'Partner\BimController@verificarEntidadeReferencia');

Route::post('store/login', 'Api\LoginStore@login');
Route::post('store/refresh', 'Api\LoginStore@refresh');

Route::get('period-store-day-test', [CloseController::class, 'getPeriodCloses']);

Route::middleware('auth:store-api')->prefix('store')->group(function () {

    Route::get('account', 'StoreController@getUser');
    Route::post('generate-transaction-store', 'StoreAmountGenerationController@generateTransactionStore');
    Route::get('get-transactions/{id}', 'StoreController@getTransactions');
    Route::get('get-period-transactions/{date1}/{date2}', [StoreController::class, 'getPeriodTransactions']);
    Route::get('get-all-transactions', 'StoreController@getAllTransactions');
    Route::post('get-closed-transactions', 'StoreController@getClosedTransactions');
    Route::get('get-dashboard/{id}', 'StoreController@getDashboard');
    Route::post('get-dashboard2', 'StoreController@getDashboard2');
    Route::get('get-daily-dashboard', 'StoreController@getDailyDashboard');
    Route::post('update-firebase-token', 'StoreController@updateFirebaseToken');

    Route::get('close-store-day', 'StoreController@getStoreDayCloses');
    Route::get('period-store-day', [CloseController::class, 'getPeriodCloses']);
    Route::post('logout', 'Api\LoginStore@logout');

    Route::post('change-password', 'StoreController@changePassword');

    Route::get('admin/get-merchant-transactions/{id}', 'StoreController@getStoreTransactions');

    Route::post('receive-notification', [StoreDeviceController::class, 'receiveNotification']);

    Route::post('refund-account', [RefundController::class, 'refundCustomerNewStore']);
    Route::post('confirm-refund-account', [RefundController::class, 'refundConfirmation']);
    Route::post('close-period', [CloseController::class, 'closePeriod']);
    Route::post('open-period', [CloseController::class, 'openPeriod']);

});

Route::get('store/dashboard', 'StoreController@getChartDashboard');
//Route::get('store/get-dashboard/{id}', 'StoreController@getDashboard');


//MERCHANT ROUTES
Route::post('merchant/login', 'Api\MerchantController@login');
Route::post('merchant/refresh', 'Api\MerchantController@refresh');


Route::middleware('auth:merchant-api')->prefix('merchant')->group(function () {

    Route::get('account', 'MerchantController@loggedUser');
    Route::post('logout', 'Api\MerchantController@logout');

//    Route::get('get-merchant-stores/{id}', 'ComercianteController@getStore');
//    Route::get('get-store-payments', 'MerchantController@getPayments');
    Route::get('get-store-payments/{date1}/{date2}', [MerchantController::class, 'getPaymentsWithDate']);
    Route::get('get-stores', 'MerchantController@getMerchantStores');

    Route::post('refund-imali-account', [RefundController::class, 'refundCustomerNew']);
    Route::post('refund-confirmation', [RefundController::class, 'refundConfirmation']);

    Route::get('get-refunds', [RefundController::class, 'getRefundCustomer']);

    Route::post('change-password', [MerchantController::class, 'changePassword']);

    Route::get('get-store-periods/{storeId}', [MerchantController::class, 'getStorePeriods']);
    Route::get('get-store-period-transactions/{storeId}', [MerchantController::class, 'getPeriodTransactions']);


    Route::get('get-imali-account/{accountNumber}', 'MerchantController@getImaliAccount');
    Route::get('get-periodos', 'MerchantController@getPeridos');
    Route::get('get-periodos-loja/{storeId}', 'MerchantController@getPeridosLoja');
    Route::get('get-closed-transactions-store/{storeId}/{dateReference}', 'MerchantController@getPagamentosPeriodoLoja');
    Route::get('get-general-dashboard', 'MerchantController@getMerchantDashboard');
    Route::get('get-store-dashboard/{storeId}', 'MerchantController@getStoreDashboard');

    Route::get('get-period-transactions/{store_id}/{date1}/{date2}', [StoreController::class, 'getPeriodTransactionsMerchant']);


});


//Route::get('/miguel-admin', 'LogController@getLogs')->middleware('auth:admin-api');
Route::post('admin/save-comerciante-test', 'ComercianteController@saveComerciante');
//Route::get('admin/get-daily-close-topup', 'CloseController@getTopUpDailyClose');
//Route::get('admin/get-daily-close-topup/{date1}/{date2}', 'CloseController@getTopUpDailyClose');
Route::get('admin/get-daily-close-topup/{date1}/{date2}', [CloseController::class, 'getTopUpDailyClose']);
Route::get('admin/get-documents-test', 'UserDocumentController@getDocuments');


Route::post('register', 'Api\Auth\RegisterController@register');
Route::post('login', 'Api\Auth\LoginController@login');
Route::post('refresh', 'Api\Auth\LoginController@refresh');
Route::post('send-password-reset-link', 'Api\Auth\LoginController@resetLink');


//===================== ADMIN ROUTES =====================

Route::prefix('admin')->group(function () {

    Route::post('save-user', [AdminController::class, 'saveUser']);
    Route::post('login', [AdminController::class, 'login']);
    Route::post('refresh', [AdminController::class, 'refresh']);
    Route::post('logout', [AdminController::class, 'logout']);
});

//Route::get('get-type-services', [TypeServiceController::class, 'index']);
//Route::post('save-type-services', [TypeServiceController::class, 'store']);
//Route::post('update-type-services/{id}', [TypeServiceController::class, 'update']);
//Route::get('delete-type-services/{id}', [TypeServiceController::class, 'destroy']);
//Route::get('get-type-services/{id}', [TypeServiceController::class, 'edit']);

//Route::get('get-services', [ServiceConfigController::class, 'index']);
//Route::post('save-services', [ServiceConfigController::class, 'store']);
//Route::post('update-services/{id}', [ServiceConfigController::class, 'update']);
//Route::get('delete-services/{id}', [ServiceConfigController::class, 'destroy']);
//Route::get('get-services/{id}', [ServiceConfigController::class, 'edit']);

//Route::get('get-account-services', [ServiceConfigAccountController::class, 'index']);
//Route::post('save-account-services', [ServiceConfigAccountController::class, 'store']);
//Route::post('update-account-services/{id}', [ServiceConfigAccountController::class, 'update']);
//Route::get('delete-account-services/{id}', [ServiceConfigAccountController::class, 'destroy']);
//Route::get('get-account-services/{id}', [ServiceConfigAccountController::class, 'edit']);





Route::middleware('auth:admin-api')->prefix('admin')->group(function () {

    Route::get('get-topup-history/{date1}/{date2}', [VoucherHistoryController::class, 'getVoucherHistories']);

    Route::post('add-or-update-config', [StoreConfigController::class, 'addOrUpdateConfigs']);
    Route::get('get-store-config/{id}', [StoreConfigController::class, 'getStoreConfig']);


    Route::get('find-imali-account/{query}', [MerchantController::class, 'getAccountNumber']);
    Route::get('find-store-account/{query}', [MerchantController::class, 'getStoreAccount']);
    Route::get('find-merchant-account/{query}', [MerchantController::class, 'getMerchantAccount']);


    Route::post('update-store-logo', [StoreController::class, 'updateStoreImage']);

    // reset Password
    Route::post('change-password', [AdminController::class, 'changePassword']);

    Route::post('deny-documents-update', 'UserDocumentController@negarPedidoActualizacaoDocumentos');
    Route::post('accept-documents-update', 'UserDocumentController@updateUserInformation');


    Route::get('get-documents/{status}', 'UserDocumentController@getDocuments');
    Route::get('get-user-documents/{id}', 'UserDocumentController@getUserDocuments');

    Route::post('send-messages', 'PushNotificationController@sendMessage');

    Route::get('get-app-logs', [LogController::class, 'getLogs']);
    Route::get('get-full-logs', [LogController::class, 'getFullLog']);

    Route::get('get-my-transferencias2/{id}', 'PaymentController@getTransferenciasHistory');
    Route::get('get-my-transferencias-data', 'PaymentController@getTransferenciasHistoryData');

    Route::get('get-imali-configuracoes', 'DashboardController@getImaliConfiguracoes');
    Route::get('get-carregamentos2/{datainicial}/{datafinal}', 'DashboardController@getCarregamentos');

    Route::get('get-dashboard', 'DashboardController@getIndicadores');

    Route::post('update-imaliaccount-config', 'DashboardController@updateImaliAccountConfig');


    Route::post('update-imaliaccount-kyc', 'ImaliAccountController@updateKyc');


    // USERS ALL AND CRUD //

    Route::post('create-user', 'Api\AdminController@saveUser');
    Route::get('account', 'Api\AdminController@loggedUser');
    Route::get('paytekusers', 'Api\AdminController@getUsers');
    Route::get('delete-user/{id}', 'Api\AdminController@deleteUser');
    Route::get('get-user/{id}', 'Api\AdminController@getUser');
    Route::post('update-user', 'Api\AdminController@updateUser');
    Route::get('paytekuser-enable-or-disable/{id}', 'Api\AdminController@enableOrDisable');
//    Route::get('admin/update-profile-user/{id}', 'Api\AdminController@updateUserPasword');
    Route::post('update-user-password', 'Api\AdminController@updateUserPasword');


    Route::get('get-merchant-transactions/{id}', 'StoreController@getStoreTransactions');

    // END USERS AND CRUD


    Route::get('get-profits/{date1}/{date2}', 'ProfitController@getProfits');
//    Route::get('get-stores', 'StoreController@getStores');
    Route::get('get-stores', [StoreController::class, 'getStores']);
//    Route::get('get-stores', [StoreController::class, 'getStorePayments']);

    Route::get('get-imali-accounts', 'UserController@getImaliAccounts');

    Route::get('get-merchant-stores/{id}', 'ComercianteController@getStore');
    Route::post('get-merchant', 'ComercianteController@getMerchant2');
    Route::get('get-comerciantes', 'ComercianteController@getComerciantes');
    Route::get('get-ramo-activity', 'ComercianteController@getRamoActivity');

    Route::get('get-stores', 'StoreController@getStores');
    Route::get('get-profits', 'ProfitController@getProfits');

    Route::get('get-imali-configuracoes', 'DashboardController@getImaliConfiguracoes');
    Route::get('get-carregamentos2/{datainicial}/{datafinal}', 'DashboardController@getCarregamentos');

    Route::get('get-dashboard', 'DashboardController@getIndicadores');

    Route::post('update-imaliaccount-config', 'DashboardController@updateImaliAccountConfig');


    Route::get('get-imali-accounts', 'UserController@getImaliAccounts');


    Route::get('mytransactions/{id}', 'PaymentController@getMyTransactions');
    Route::get('get-user/{id}', 'PaymentController@getUser');
    Route::get('get-test/{id}', 'PaymentController@getTesteTransaction');
    Route::post('recharge', 'UserController@rechargeAccount');
    Route::post('recharge-bank-reference', 'UserController@rechargeByReference');
    Route::get('users', 'UserController@users');
    Route::get('get-bank-connections', 'UserController@bankConnections');
    Route::post('update-user-data-mobile', 'UserController@updateUserDataMobile');

    // SAVE COMERCIANTE
//    Route::post('save-comerciante', 'ComercianteController@saveComerciante');
    Route::post('save-comerciante', [ComercianteController::class, 'saveComerciante']);
//    Route::post('save-store', 'ComercianteController@saveLoja');
    Route::post('save-store', [ComercianteController::class, 'saveLoja']);
    Route::post('update-merchant', 'ComercianteController@updateComerciante');

    // FIM DO SAVE MERCHANT


    Route::post('mine-transaction', 'PaymentController@makePayment');
    Route::post('mine-transaction-store', 'PaymentController@makePaymentStore');
    Route::get('get-payments', 'PaymentController@getPayments');
    Route::get('get-my-payment/{id}', 'PaymentController@getMyPayments');
    Route::get('get-my-payments', 'PaymentController@getMyPayments2');
    Route::get('get-transferencias', 'PaymentController@getTransferencias');
    Route::get('get-carregamentos', 'PaymentController@getCarregamentos');
    Route::get('get-my-carregamentos2/{id}', 'PaymentController@getMyCarregamentos2');
    Route::get('get-my-carregamentos', 'PaymentController@getMyCarregamentos');
    Route::get('get-my-transferencias/{id}', 'PaymentController@getMyTransferencias');

    Route::post('transfer-money', 'PaymentController@transferMoney');
    Route::post('check-account', 'PaymentController@checkReceiver');
    Route::get('get-comerciante2/{account_number}', 'ComercianteController@getComerciante2');
    Route::get('get-comerciante/{account_number}', 'ComercianteController@getComerciante');


    Route::get('generate-qrcode/{id}/{account_number}', 'ComercianteController@generateQrcode');

    Route::post('get-merchant', 'ComercianteController@getMerchant2');
    Route::get('get-comerciantes', 'ComercianteController@getComerciantes');
    Route::get('get-ramo-activity', 'ComercianteController@getRamoActivity');


    // Get Users By admon
    Route::get('get-user-by-account-number/{account_number}', 'ComercianteController@getUserByImaliAccount');
    Route::get('get-user-by-account-reference/{reference}', 'ComercianteController@getUserByImaliAccountReference');
    Route::get('get-user-data/{id}', 'ComercianteController@getUserData');

    // PESQUISA POR PARAMETRO
    Route::post('update-store', 'StoreController@updateStore');
    Route::get('get-merchant-transactions-searched/{datainicial}/{datafinal}/{id}', 'StoreController@getStorePayments');
    Route::get('get-transferencias2/{datainicial}/{datafinal}', 'DashboardController@getTransferencias');
    Route::get('get-transaction-history/{datainicial}/{datafinal}/{imali}/{type}', 'ImaliAccountController@getImaliTransactions');


    Route::get('get-payments2/{datainicial}/{datafinal}', 'DashboardController@getPayments');
    Route::get('get-transferencias2/{datainicial}/{datafinal}', 'DashboardController@getTransferencias');

    Route::get('get-comerciante-payments/{account_number}', 'ComercianteController@getComercianteTransactions');

    Route::get('get-my-transferencias2/{id}', 'PaymentController@getTransferenciasHistory');
    Route::get('get-my-transferencias-data', 'PaymentController@getTransferenciasHistoryData');


    // KYC
    Route::post('save-kyc', 'UserKycController@saveKyc');
    Route::post('update-kyc', 'UserKycController@updateKyc');
    Route::get('delete-kyc/{id}', 'UserKycController@deleteKyc');


    // CLOSE DAY

    Route::get('store-closes/{date1}/{date2}', 'StoreController@getAdminStoresCloses');
    Route::get('close-store-day', 'StoreController@getStoreDayCloses');
    Route::post('save-close-store-day', 'DayCloseStoreController@dayCloseStore');
    Route::get('store-day-closes/{store_id}', 'StoreController@getStoreCloses');


//    MPESA
    Route::post('revert-recharge-transanction', 'UserController@reverteTransaction');
    Route::post('send-money-b2b', 'UserController@sendMoneyB2B');
    Route::post('send-money-imali-mpesa', 'UserController@sendMoneyImaliMpesa')->middleware('json.response');

// ================ SERVICES NOTIFICATION =======================
Route::get('get-services', [ServiceConfigController::class, 'index']);
Route::post('save-services', [ServiceConfigController::class, 'store']);
Route::post('update-services/{id}', [ServiceConfigController::class, 'update']);
Route::get('delete-services/{id}', [ServiceConfigController::class, 'destroy']);
Route::get('get-services/{id}', [ServiceConfigController::class, 'edit']);

Route::get('get-account-services', [ServiceConfigAccountController::class, 'index']);
Route::post('save-account-services', [ServiceConfigAccountController::class, 'store']);
Route::post('update-account-services/{id}', [ServiceConfigAccountController::class, 'update']);
Route::get('delete-account-services/{id}', [ServiceConfigAccountController::class, 'destroy']);
Route::get('get-account-services/{id}', [ServiceConfigAccountController::class, 'edit']);

//================ FIM DE SERVICES NOTIFICATION =======================
});
//fim rotas admin

 ## ================ SERVICES NOTIFICATION =======================
///Route::get('get-services', [ServiceConfigController::class, 'index']);
//Route::post('save-services', [ServiceConfigController::class, 'store']);
//Route::post('update-services/{id}', [ServiceConfigController::class, 'update']);
//Route::get('delete-services/{id}', [ServiceConfigController::class, 'destroy']);
//Route::get('get-services/{id}', [ServiceConfigController::class, 'edit']);

//Route::get('get-account-services', [ServiceConfigAccountController::class, 'index']);
//Route::post('save-account-services', [ServiceConfigAccountController::class, 'store']);
//Route::post('update-account-services/{id}', [ServiceConfigAccountController::class, 'update']);
//Route::get('delete-account-services/{id}', [ServiceConfigAccountController::class, 'destroy']);
//Route::get('get-account-services/{id}', [ServiceConfigAccountController::class, 'edit']);

## ================ FIM DE SERVICES NOTIFICATION =======================



//Route::post('add-store-to-client', 'UserClientController@addStoreToUserClient');
Route::post('add-store-to-client', [UserClientController::class, 'addStoreToUserClient']);
Route::post('userF', 'UserClientController@getUser');
Route::post('send-codigo', 'UserController@verifyUserNumber');
Route::post('resend-code-verification', 'UserController@resendCode');
Route::post('check-codigo', 'UserController@checkCodigo');

Route::post('sms-test', 'UserController@sendSMS');


Route::get('teste', 'UserController@teste');


Route::post('update-firebase-token', 'UserController@updateFirebaseToken');

Route::post('recharge-by-reference', 'UserController@rechargeByReference2');
Route::get('topup-water-client2', 'TopUpController@getWaterClient');
Route::get('topup-advice', 'TopUpController@runAdvice');
Route::get('topup-close', 'TopUpController@topUpClose');
Route::get('topup-balance', 'TopUpController@getBalance');



Route::get('get-my-devices', 'ConfigController@getMyDevices');

Route::get('get-map-stores-off', [MerchantController::class, 'getAllStores']);

Route::middleware('auth:api')->group(function () {

    //check Pin
    Route::post('check-pin-unlock', [\App\Http\Controllers\UserController::class, 'validatePin']);

    //get All Stores
    Route::get('get-map-stores', [MerchantController::class, 'getAllStores']);

    // PAGAR STARTIMES
    Route::post('pay-startimes-test', [TopUpTestController::class, 'payStartTimesPackage']);


    // ATERAR ISTO
    Route::post('pay-startimes', [TopUpController::class, 'payStartTimesPackage']);
    Route::get('check-client-start/{smartCard}', [TopUpController::class, 'checkClientStartTimes']);


    Route::post('upload-document', 'UserDocumentController@updateDocoment');


    Route::get('get-meu-extrato', 'MonthCloseController@getMonthClose');


    Route::get('topup-zap-pacotes', 'TopUpController@getZapPacotes');
    Route::post('topup-buy-zap-pacote', 'TopUpController@buyZapPacote');

//    Route::get('topup-get-dstv/{customer_number}/{type}', 'TopUpTestController@getDstvProducts'); // teste
    Route::get('topup-get-dstv/{customer_number}/{type}', [TopUpController::class, 'getDstvProducts']);

//    Route::post('topup-pay-dstv', 'TopUpTestController@buyDstvPacote'); // teste
    Route::post('topup-pay-dstv', [TopUpController::class, 'buyDstvPacote']);
    Route::post('pay-dstv', 'TopUpTestController@buyDstvPacote');

    Route::get('get-my-water-contador', 'WaterController@getWaterContadores');

    Route::post('topup-water-client', 'TopUpController@getWaterClient');
    Route::post('topup-pay-water', 'TopUpController@payWater');

    Route::post('topup-check-contador', 'TopUpController@checkContador');
    Route::get('get-my-contador', 'TopUpController@getMyContador');

    Route::post('deny-money-request', 'MoneyRequestController@recusarPedido');
    Route::post('money-request', 'MoneyRequestController@requestMoney');
    Route::get('get-meus-pedidos', 'MoneyRequestController@getMeusPedidos');


    Route::get('get-app-logs', 'LogController@getLogs');

    Route::post('update-avatar', 'UserController@updateAvatar');
    Route::get('user', 'UserController@getUser');
    Route::get('show-hide-balance', 'UserController@hideAndShowBalance');
    Route::get('disable-user/{id}', 'UserController@disableUser');
    Route::post('change-password', 'UserController@changePassword');
    Route::post('check-pin', 'UserController@checkPin');

//    Route::post('generate-amount', 'UserController@generateAmount');
    Route::post('generate-amount', [UserController::class, 'generateAmount']);
    Route::get('get-client/{transaction}', 'UserController@getClientDataForPayment');
    Route::get('get-client-account/{account}', [UserController::class, 'getClientAccount']);


    Route::post('upload-photo', 'UserController@uploadPhoto');
//    Route::post('logout', 'Api\Auth\LoginController@refresh');
    Route::post('logout', 'Api\Auth\LoginController@logout');
    Route::get('get-my-imali/{id}', 'UserController@getMyImaliAccount');

    Route::get('get-imali-accounts', 'UserController@getImaliAccounts');


    Route::get('mytransactions/{id}', 'PaymentController@getMyTransactions');
    Route::get('get-user/{id}', 'PaymentController@getUser');
    Route::get('get-test/{id}', 'PaymentController@getTesteTransaction');
    Route::post('recharge', 'UserController@rechargeAccount');
    Route::post('recharge-bank-reference', 'UserController@rechargeByReference');
    Route::get('users', 'UserController@users');
    Route::get('get-bank-connections', 'UserController@bankConnections');
    Route::post('update-user-data-mobile', 'UserController@updateUserDataMobile');

    Route::post('save-comerciante', 'ComercianteController@saveComerciante');
    Route::post('save-store', 'ComercianteController@saveLoja');
    Route::post('update-merchant', 'ComercianteController@updateComerciante');
    Route::post('mine-transaction', 'PaymentController@makePayment');

    // MAKE PAYMENT
//    Route::post('mine-transaction-store', 'PaymentController@makePaymentStore');
    //    Route::post('mine-transaction-store-no-pin', 'PaymentController@makePaymentStore2');

    Route::post('mine-transaction-store', [PaymentController::class, 'makePaymentStoreAppNew']);
//    Route::post('mine-transaction-store', [PaymentController::class, 'makePaymentStore']);
//    Route::post('mine-transaction-store-no-pin', [PaymentController::class, 'makePaymentStore2']);
    Route::post('mine-transaction-store-no-pin', [PaymentController::class, 'makePaymentStoreAppNew']);


    Route::get('get-payments', 'PaymentController@getPayments');
    Route::get('get-my-payment/{id}', 'PaymentController@getMyPayments');
    Route::get('get-my-payments', 'PaymentController@getMyPayments2');
    Route::get('get-transferencias', 'PaymentController@getTransferencias');
    Route::get('get-carregamentos', 'PaymentController@getCarregamentos');
    Route::get('get-my-carregamentos2/{id}', 'PaymentController@getMyCarregamentos2');
    Route::get('get-my-carregamentos', 'PaymentController@getMyCarregamentos');
    Route::get('get-my-transferencias/{id}', 'PaymentController@getMyTransferencias');
    Route::get('get-my-vouchers', 'PaymentController@getMyVouchers');

    Route::post('transfer-money', 'PaymentController@transferMoney');
    Route::post('transfer-money-no-pin', 'PaymentController@transferMoney2');
    Route::post('check-account', 'PaymentController@checkReceiver');
    Route::get('get-comerciante2/{account_number}', 'ComercianteController@getComerciante2');
    Route::get('get-comerciante/{account_number}', 'ComercianteController@getComerciante');
//    Route::post('get-merchant', 'ComercianteController@getMerchant');
//    Route::post('get-merchant', 'ComercianteController@getMerchant2');

    Route::post('get-merchant', [ComercianteController::class, 'getStorePayment']);
    Route::get('get-comerciantes', 'ComercianteController@getComerciantes');
    Route::get('get-ramo-activity', 'ComercianteController@getRamoActivity');

//Route::get('get-user-by-account-number/{account_number}', 'ComercianteController@getUserByImaliAccount');
    Route::get('get-user-by-account-number/{account_number}', 'ComercianteController@getUserByImaliAccount');
    Route::get('get-user-by-account-number-phone/{account_number}', 'ComercianteController@getUserByImaliAccountPhone');
    Route::get('get-user-data/{id}', 'ComercianteController@getUserData');


    Route::get('get-payments2/{datainicial}/{datafinal}', 'DashboardController@getPayments');
    Route::get('get-transferencias2/{datainicial}/{datafinal}', 'DashboardController@getTransferencias');

    Route::get('get-comerciante-payments/{account_number}', 'ComercianteController@getComercianteTransactions');

    Route::get('get-my-transferencias2/{id}', 'PaymentController@getTransferenciasHistory');
    Route::get('get-my-transferencias-data', 'PaymentController@getTransferenciasHistoryData');

//    Route::get('get-imali-configuracoes', 'DashboardController@getImaliConfiguracoes');
//    Route::get('get-carregamentos2/{datainicial}/{datafinal}', 'DashboardController@getCarregamentos');
//
//    Route::get('get-dashboard', 'DashboardController@getIndicadores');
//
//    Route::post('update-imaliaccount-config', 'DashboardController@updateImaliAccountConfig');

    Route::post('buy-voucher', 'TopUpController@buyVoucher');
    Route::post('buy-voucher-token', 'TopUpController@buyVoucherPin');
    Route::post('buy-voucher-direct', 'TopUpController@buyVoucherDirectRecharge');
//    Route::post('buy-voucher-advice', 'TopUpController@buyVoucherWithAdvice');


    // MOBILE ROUTES
    Route::get('get-imali-by-phone/{phone}', 'ImaliAccountController@getImaliByPhoneNumber');
    Route::get('get-contacts', 'ImaliAccountController@getContacts');
    Route::get('get-contacts2', 'ImaliAccountController@getContacts2');
    Route::get('get-my-month-consuming', 'UserController@getMyMonthConsuming');
    Route::get('get-my-credelec', 'UserController@getMyCredelec');
    Route::get('get-my-water', 'UserController@getMyWater');
    // END MOBILE ROUTES //

    Route::post('buy-credelec', 'TopUpController@buyCredelec');

});

Route::get('get-contacts3', 'ImaliAccountController@getContacts2');
// TESTES


//FIM DOS TESTES

Route::post('test/save-store', 'ComercianteController@saveLoja');

Route::get('est', 'DashboardController@getMyStatics');

//Route::post('buy-voucher', 'TopUpController@buyVoucher');
Route::post('buy-voucher-advice', 'TopUpController@buyVoucherWithAdvice');

Route::get('get-voucher-list', 'TopUpController@getVoucherList');
//Route::post('buy-voucher-direct', 'TopUpController@buyVoucherDirectRecharge');
Route::get('get-voucher-list-local/{id}', 'TopUpController@getVoucherListLocal');
Route::get('get-voucher-types', 'TopUpController@getVoucherTypes');
Route::post('save-voucher-type', 'TopUpController@saveVoucherType');
Route::get('get-voucher-tv', 'TopUpController@getVoucherTv');

//Route::post('recarga-test', 'RecargaAquiController@getVouchers');
Route::post('recarga-test', 'RecargaAquiController@secureSocket');

Route::get('secure-socket', 'RecargaAquiController@secureSocket');


Route::get('send-sms', 'ProfitController@sendSMS');

Route::post('recharge-mpesa-java', 'ApiController@mPesaRecharge');

Route::get('get-users2', 'UserController@getUsers');

Route::post('kyc', 'UserKycController@check');
Route::post('kyc-recharge', 'UserKycController@makeCheck');
Route::post('kyc-payment-check', 'UserKycController@checkSenderPayment');


Route::post('close-store-day', 'DayCloseStoreController@dayCloseStore');