<?php

namespace App\Services\Payment\Drivers;

use App\Models\SubscriptionPayment;
use App\Services\Payment\Contracts\PaymentDriver;
use App\Services\Payment\PaymentIntent;

class ManualDriver implements PaymentDriver
{
    public function __construct(protected array $config = [])
    {
    }

    public function createIntent(SubscriptionPayment $payment): PaymentIntent
    {
        return new PaymentIntent(
            reference: $payment->reference,
            status: 'pending',
            payload: ['message' => 'Registra el pago manualmente cuando recibas el comprobante.'],
        );
    }

    public function verifyWebhook(array $payload, ?string $signature = null): bool
    {
        return true;
    }
}
