<?php
/**
 * BookiFlex Payment Extension
 *
 * @package    BookiFlex
 * @subpackage Payment
 * @author     BookiFlex
 * @copyright  Copyright (c) 2025 BookiFlex
 * @license    GPL-2.0-or-later
 *
 * @link       https://bookiflex.com
 */


declare(strict_types=1);
namespace BookiFlex\Extensions\Payment\Provider;

use BookiFlex\Extensions\Payment\Model\Payment;
use BookiFlex\Extensions\Payment\Repository\PaymentRepository;

defined( 'ABSPATH' ) || exit;

class PaymentProvider
{
    public function __construct(
        private readonly PaymentRepository $paymentRepository,
    ) {
    }

    public function find(int $paymentId): ?Payment
    {
        return $this->paymentRepository->findByPK($paymentId);
    }
}
