<?php

namespace App\Services;

interface PaymentGatewayInterface
{
    /**
     * Create a customer in the payment gateway.
     * 
     * @param  array  $customerData
     * @return mixed
     */
    public function createCustomer(array $customerData);

    /**
     * Create a checkout session for one-time payment.
     * 
     * @param  array  $paymentData
     * @return mixed
     */
    public function createOneTimeCheckout(array $paymentData);

    /**
     * Create a checkout session for subscription.
     * 
     * @param  array  $subscriptionData
     * @return mixed
     */
    public function createSubscriptionCheckout(array $subscriptionData);

    /**
     * Handle webhook from payment gateway.
     * 
     * @param  string  $payload
     * @param  string  $signature
     * @return bool
     */
    public function handleWebhook(string $payload, string $signature): bool;

    /**
     * Cancel a subscription.
     * 
     * @param  string  $subscriptionId
     * @return bool
     */
    public function cancelSubscription(string $subscriptionId): bool;

    /**
     * Get payment gateway name.
     * 
     * @return string
     */
    public function getName(): string;
}
