/home/kueuepay/public_html/routes/api/v1/user.php
<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\User\CheckoutController;
use App\Http\Controllers\Api\V1\User\ProfileController;
use App\Http\Controllers\Api\V1\User\SaveCardController;
use App\Http\Controllers\Api\V1\User\AddMoneyController; 
use App\Http\Controllers\Api\V1\User\DashboardController;
use App\Http\Controllers\Api\V1\User\TransferMoneyController;
use App\Http\Controllers\Api\V1\User\TransactionLogController;
use App\Http\Controllers\Api\V1\User\MerchantDetailsController;
use App\Http\Controllers\Api\V1\User\Auth\AuthorizationController;

Route::prefix("user")->name("api.user.")->group(function(){
    Route::middleware('auth:api')->group(function(){
        Route::post('google-2fa/otp/verify', [AuthorizationController::class,'verify2FACode']);
        Route::controller(ProfileController::class)->prefix('profile')->group(function(){
            Route::get('info','profileInfo');
            Route::post('delete-account','deleteProfile')->middleware('app.mode');
            Route::post('info/update','profileInfoUpdate')->middleware('app.mode');
            Route::post('password/update','profilePasswordUpdate')->middleware('app.mode');
    
            Route::get('/google-2fa', 'google2FA')->middleware('app.mode');
            Route::post('/google-2fa/status/update', 'google2FAStatusUpdate')->middleware('app.mode');
            Route::controller(AuthorizationController::class)->prefix('kyc')->group(function(){
                Route::get('input-fields','getKycInputFields');
                Route::post('submit','KycSubmit');
            });
        });
    
        // Logout Route
        Route::post('logout',[ProfileController::class,'logout']);
        // Dashboard, Notification, 
        Route::controller(DashboardController::class)->group(function(){
            Route::get("dashboard","dashboard");
            Route::get("notifications","notifications");
        });
    
        // payment details 
        Route::controller(CheckoutController::class)->prefix('payment')->group(function(){
            Route::get('details','details');
        });
    
        //merchat details 
        Route::controller(MerchantDetailsController::class)->prefix('merchant')->group(function(){
            Route::get('details','details');
            Route::get('api-keys','apiKeys');
            Route::post('store','store');
            Route::post('credentials-update','credentialsUpdate');
            Route::post('status-update','status');
        });
    
        //card method 
        Route::controller(SaveCardController::class)->prefix('card-method')->group(function(){
            Route::get('all','index');
            Route::post('store','store');
            Route::post('delete','delete');
            Route::post('make-default','makeDefault');
        });

        //transfer money 
        Route::controller(TransferMoneyController::class)->prefix('transfer-money')->group(function(){
            Route::get('info','info');
            Route::post('confirm','confirm')->middleware('api.kyc.verification.guard');
            Route::post('check-user','checkUser')->middleware('api.kyc.verification.guard');
        });
    
        //add money
        Route::controller(AddMoneyController::class)->prefix('add-money')->name('add.money.')->group(function(){
            Route::get('info','info');
            Route::post('confirm','confirm');

            Route::post('success/response/{gateway}', 'postSuccess')->name('payment.success')->withoutMiddleware(['auth:api','verification.guard','kyc.verification.guard','user.google.two.factor','api.kyc.verification.guard']);
            Route::post('cancel/response/{gateway}', 'postCancel')->name('payment.cancel')->withoutMiddleware(['auth:api','verification.guard','kyc.verification.guard','user.google.two.factor']);
        
            // Automatic Gateway Response Routes
            Route::get('success/response/{gateway}','success')->withoutMiddleware(['auth:api','verification.guard','kyc.verification.guard','user.google.two.factor'])->name("payment.success");
            Route::get("cancel/response/{gateway}",'cancel')->withoutMiddleware(['auth:api','verification.guard','kyc.verification.guard','user.google.two.factor'])->name("payment.cancel");

            //redirect with Btn Pay
            Route::get('redirect/btn/checkout/{gateway}', 'redirectBtnPay')->name('payment.btn.pay')->withoutMiddleware(['auth:api','verification.guard','kyc.verification.guard','user.google.two.factor']);

            Route::get('manual/input-fields','manualInputFields'); 
            Route::post('manual-submit','manualSubmit');
        });
        //transaction log
        Route::controller(TransactionLogController::class)->prefix('transaction-log')->group(function(){
            Route::get('all','index');
            Route::get('add-money','addMoney');
            Route::get('transfer-money','transferMoney');
            Route::get('payment','payment');
        });
    });
    


});
Web Journal
top

Discover the Latest in Digital Payments and NFC Technology

Dive into our blog to explore the cutting-edge trends in digital payments and NFC technology. Stay updated on the innovations that are revolutionizing transactions, boosting security, and making payments quicker and more convenient. Learn how these advancements are shaping the future of financial interactions and driving the global transition towards a cashless world.

The Rise of Contactless Payments:...

In recent years, contactless payments have surged in popularity, driven...

Enhancing Payment Security: The Role...

As digital transactions proliferate, ensuring robust payment security is more critical than ever. Two foundational...

The Future of Digital Wallets:...

Digital wallets have fundamentally transformed how we manage money, offering a streamlined, secure, and highly...