forked from apoloz/alfa-bank-sdk
first commit
This commit is contained in:
41
src/Requests/Sandbox/SignatureEncryptionTestRequest.php
Normal file
41
src/Requests/Sandbox/SignatureEncryptionTestRequest.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user