<?php
declare(strict_types=1);

namespace App\Modules\Payments;

use App\Core\Contracts\PaymentProcessorInterface;
use App\Modules\Payments\Services\PaymentService;

final class PaymentProcessorAdapter implements PaymentProcessorInterface
{
    public function processPayment(array $data): array
    {
        return PaymentService::processPayment($data);
    }

    public function voidPayment(int $paymentId, string $reason): array
    {
        return PaymentService::voidPayment($paymentId, $reason);
    }

    public function hasPaid(int $memberId, string $paymentType, ?string $relatedEntityType = null, ?int $relatedEntityId = null): bool
    {
        return PaymentService::hasPaid($memberId, $paymentType, $relatedEntityType, $relatedEntityId);
    }

    public function totalPaid(int $memberId, ?string $paymentType = null): string
    {
        return PaymentService::totalPaid($memberId, $paymentType);
    }

    public function generateReceiptNumber(): string
    {
        return PaymentService::generateReceiptNumber();
    }

    public function getPaymentTypeLabel(string $type): string
    {
        return PaymentService::getPaymentTypeLabel($type);
    }
}
