first commit

This commit is contained in:
2026-01-14 16:40:33 +03:00
commit f803480f7b
184 changed files with 5573 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
<?php
namespace Gemini\AlfaBank\Sbp\Requests\Reversal;
use Gemini\AlfaBank\Sbp\Data\Reversal\GetQrcReversalStatusRequestData;
use Gemini\AlfaBank\Sbp\Data\Reversal\GetQrcReversalStatusResponseData;
use Saloon\Contracts\Body\HasBody;
use Saloon\Enums\Method;
use Saloon\Http\Request;
use Saloon\Http\Response;
use Saloon\Traits\Body\HasJsonBody;
class GetQrcReversalStatusRequest extends Request implements HasBody
{
use HasJsonBody;
protected Method $method = Method::POST;
public function __construct(
protected GetQrcReversalStatusRequestData $data
) {}
public function resolveEndpoint(): string
{
return '';
}
protected function defaultBody(): array
{
$body = [
'command' => 'GetQRCreversalStatus',
'TermNo' => $this->data->TermNo,
];
if ($this->data->payrrn !== null) $body['payrrn'] = $this->data->payrrn;
if ($this->data->originalTrxId !== null) $body['originalTrxId'] = $this->data->originalTrxId;
if ($this->data->trxId !== null) $body['trxId'] = $this->data->trxId;
if ($this->data->messageID !== null) $body['messageID'] = $this->data->messageID;
return $body;
}
public function createDtoFromResponse(Response $response): GetQrcReversalStatusResponseData
{
return GetQrcReversalStatusResponseData::from($response->json());
}
}