<reponame>arthurcadren/Projet-gestion-des-infrastructures-de-la-faculte-des-sciences<gh_stars>0<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Http\Requests\CalculatePaymentRequest;
use App\Processors\PriceCalculationProcessor;

class PaymentController extends Controller
{
    public function __invoke(
        CalculatePaymentRequest $request,
        PriceCalculationProcessor $processor
    ): int
    {
        return $processor->process($request->get('reservation_id'));
    }
}
