forked from apoloz/alfa-bank-sdk
first commit
This commit is contained in:
32
src/AlfaBankConnector.php
Normal file
32
src/AlfaBankConnector.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank;
|
||||
|
||||
use Gemini\AlfaBank\Enums\Environment;
|
||||
use Saloon\Http\Connector;
|
||||
use Saloon\Traits\Plugins\HasTimeout;
|
||||
|
||||
class AlfaBankConnector extends Connector
|
||||
{
|
||||
use HasTimeout;
|
||||
|
||||
public function __construct(
|
||||
protected string $certificatePath,
|
||||
protected string $privateKeyPath,
|
||||
protected Environment $environment = Environment::PRODUCTION
|
||||
) {}
|
||||
|
||||
public function resolveBaseUrl(): string
|
||||
{
|
||||
return $this->environment->value;
|
||||
}
|
||||
|
||||
protected function defaultConfig(): array
|
||||
{
|
||||
return [
|
||||
'cert' => $this->certificatePath,
|
||||
'ssl_key' => $this->privateKeyPath,
|
||||
'verify' => true, // Ensure SSL verification is on
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user