<?php

use App\Http\Controllers\PaymentController;
use Illuminate\Support\Facades\Route;

Route::get('/payment',  [PaymentController::class, 'index'])->middleware('permission:payment,view');
Route::post('/payment', [PaymentController::class, 'store'])->middleware('permission:payment,add');

Route::get('/payment/platform-fees',                           [PaymentController::class, 'platformFees']);
Route::post('/payment/service-package/{servicePackageId}/pay', [PaymentController::class, 'payServicePackage'])->middleware('permission:config.schedule,edit');
Route::get('/payment/service-package/{servicePackage}/pix',    [PaymentController::class, 'getServicePackagePix'])->middleware('permission:config.schedule,view');

Route::get('/payment/{id}',    [PaymentController::class, 'show'])->middleware('permission:payment,view');
Route::put('/payment/{id}',    [PaymentController::class, 'update'])->middleware('permission:payment,edit');
Route::delete('/payment/{id}', [PaymentController::class, 'destroy'])->middleware('permission:payment,delete');
