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


declare(strict_types=1);
namespace BookiFlex\Core\Contract\Payment;

defined( 'ABSPATH' ) || exit;

interface PaymentGatewayManagerInterface
{
    /**
     * Get all registered payment gateways.
     *
     * @return array
     */
    public function getPaymentGateways(): array;

    /**
     * Register a payment gateway.
     *
     * Payum-backed gateways pass both factories. Omitting them registers an
     * external gateway (e.g. WooCommerce): it appears in the admin gateway list
     * but is skipped by makePayum(), and its initiation/sync is handled by a
     * dedicated PaymentProcessorInterface implementation.
     *
     * @param string $id
     * @param string $name
     * @param bool $supportAuthorize
     * @param callable|null $gatewayFactory
     * @param callable|null $gatewaySettingsFactory
     * @param callable|null $adminSettingsFactory
     */
    public function registerPaymentGateway(
        string $id,
        string $name,
        bool $supportAuthorize,
        ?callable $gatewayFactory = null,
        ?callable $gatewaySettingsFactory = null,
        ?callable $adminSettingsFactory = null
    );
}
