forked from apoloz/alfa-bank-sdk
refactor(Sbp)
This commit is contained in:
@@ -5,15 +5,16 @@ declare(strict_types=1);
|
||||
namespace Apoloz\AlfaBank\Sbp\Requests\Reversal;
|
||||
|
||||
use Apoloz\AlfaBank\Sbp\Data\Reversal\ReversalHistoryResponseData;
|
||||
use Apoloz\AlfaBank\Utils\CmsSigner;
|
||||
use Saloon\Contracts\Body\HasBody;
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Http\Response;
|
||||
use Saloon\Traits\Body\HasJsonBody;
|
||||
use Saloon\Traits\Body\HasStringBody;
|
||||
|
||||
class GetQrcReversalHistoryRequest extends Request implements HasBody
|
||||
{
|
||||
use HasJsonBody;
|
||||
use HasStringBody;
|
||||
|
||||
protected Method $method = Method::POST;
|
||||
|
||||
@@ -32,12 +33,14 @@ class GetQrcReversalHistoryRequest extends Request implements HasBody
|
||||
return ReversalHistoryResponseData::from($response->json());
|
||||
}
|
||||
|
||||
protected function defaultBody(): array
|
||||
protected function defaultBody(): string
|
||||
{
|
||||
return [
|
||||
$bodyArray = [
|
||||
'command' => 'GetQRCreversalHistory',
|
||||
'TermNo' => $this->TermNo,
|
||||
'payrrn' => $this->payrrn,
|
||||
];
|
||||
|
||||
return CmsSigner::canonicalize($bodyArray);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user