<?php

namespace Database\Seeders;

use App\Models\PaymentGateway;
use Illuminate\Database\Seeder;

class PaymentGatewaySeeder extends Seeder
{
    public function run(): void
    {
        $rows = [
            ['name' => 'stripe', 'display_name' => 'Stripe', 'environment' => 'sandbox'],
            ['name' => 'paypal', 'display_name' => 'PayPal', 'environment' => 'sandbox'],
            ['name' => 'square', 'display_name' => 'Square', 'environment' => 'sandbox'],
        ];

        foreach ($rows as $row) {
            PaymentGateway::query()->firstOrCreate(
                ['name' => $row['name']],
                array_merge($row, ['status' => false])
            );
        }
    }
}
