<?php

namespace App\Http\Integrations\Imake;

use Saloon\Http\Connector;
use Saloon\Traits\Plugins\AcceptsJson;

class MoorlePay extends Connector
{
    use AcceptsJson;

    /**
     * The Base URL of the API
     */
    public function resolveBaseUrl(): string
    {
        return env('MOORLE_API_URL');
    }

    /**
     * Default headers for every request
     */
    protected function defaultHeaders(): array
    {
        return [
            'Content-Type' => 'application/json',
            'x-api-key' => env('MOORLE_API_USER'),
            'x-api-pubkey' => env('MOORLE_API_PUBKEY'),
        ];
    }

    /**
     * Default HTTP client options
     */
    protected function defaultConfig(): array
    {
        return [];
    }
}