<?php

namespace Mdiqbal\LaravelPayments\Events;

use Mdiqbal\LaravelPayments\Contracts\PaymentGatewayInterface;
use Mdiqbal\LaravelPayments\DTO\PaymentRequest;
use Illuminate\Foundation\Events\Dispatchable;

class PaymentInitiated
{
    use Dispatchable;

    public function __construct(
        public PaymentGatewayInterface $gateway,
        public PaymentRequest $request
    ) {}

    /**
     * Get the gateway name
     */
    public function getGatewayName(): string
    {
        return $this->gateway->gatewayName();
    }

    /**
     * Get the order ID
     */
    public function getOrderId(): string
    {
        return $this->request->orderId;
    }

    /**
     * Get the amount
     */
    public function getAmount(): float
    {
        return $this->request->amount;
    }

    /**
     * Get the currency
     */
    public function getCurrency(): string
    {
        return $this->request->currency;
    }

    /**
     * Get the customer email
     */
    public function getCustomerEmail(): string
    {
        return $this->request->customerEmail;
    }
}