<?php


use App\Http\Controllers\Frontend\Payment\PaymentController as FrontendPaymentController;
use Illuminate\Support\Facades\Route;

Route::prefix("gateway/payment")->name("gateway.payment.")->group(function (){

    Route::post("init",[FrontendPaymentController::class,'init'])->name("init");
    Route::post("check/{transaction?}",[FrontendPaymentController::class,'check'])->name("check");

    Route::prefix("paypal-rest")->name("paypal-rest.")->group(function (){
        Route::get("success/{paymentMethod?}",[FrontendPaymentController::class,'paypalSuccess'])->name("success");
        Route::get("cancel",[FrontendPaymentController::class,'paypalCancel'])->name("cancel");
    });
});
