<?php

namespace App\Services\Payments;

use App\Models\Payment;
use App\Models\PaymentGateway;
use App\Models\SubscriptionPlan;
use App\Models\User;
use Illuminate\Http\Request;

class StripePaymentService
{
    public function initializePayment(User $user, SubscriptionPlan $plan, PaymentGateway $gateway, Payment $payment): array
    {
        // Add Stripe Checkout Session creation here using the official Stripe PHP/API documentation.
        // Only activate a subscription after Stripe verification confirms the checkout payment succeeded.
        return [
            'success' => false,
            'message' => 'Stripe payment initialization is prepared but not connected yet.',
        ];
    }

    public function verifyPayment(PaymentGateway $gateway, string $reference): array
    {
        // Add Stripe Checkout Session or PaymentIntent verification here.
        return [
            'success' => false,
            'message' => 'Stripe payment verification is prepared but not connected yet.',
        ];
    }

    public function handleWebhook(PaymentGateway $gateway, Request $request): array
    {
        // Validate Stripe webhook signatures here before trusting any webhook payload.
        return [
            'success' => false,
            'message' => 'Stripe webhook handling is prepared but not connected yet.',
        ];
    }
}
