forked from apoloz/alfa-bank-sdk
42 lines
1.0 KiB
PHP
42 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace Apoloz\AlfaBank\Requests\Sandbox;
|
|
|
|
use Saloon\Contracts\Body\HasBody;
|
|
use Saloon\Enums\Method;
|
|
use Saloon\Http\Request;
|
|
use Saloon\Traits\Body\HasStringBody;
|
|
|
|
class SignatureEncryptionTestRequest extends Request implements HasBody
|
|
{
|
|
use HasStringBody;
|
|
|
|
protected Method $method = Method::POST;
|
|
|
|
public function __construct(
|
|
protected string $jwsBody,
|
|
protected string $requestChannelSecurity = 'SIGNATURE',
|
|
protected string $responseChannelSecurity = 'SIGNATURE'
|
|
) {}
|
|
|
|
public function resolveEndpoint(): string
|
|
{
|
|
return '/api/signature-encryption-tests/json';
|
|
}
|
|
|
|
protected function defaultHeaders(): array
|
|
{
|
|
return [
|
|
'Accept' => 'application/jose',
|
|
'Content-Type' => 'application/jose',
|
|
'X-Request-ChannelSecurity' => $this->requestChannelSecurity,
|
|
'X-Response-ChannelSecurity' => $this->responseChannelSecurity,
|
|
];
|
|
}
|
|
|
|
protected function defaultBody(): ?string
|
|
{
|
|
return $this->jwsBody;
|
|
}
|
|
}
|