Улучшена документация, добавлена поддержка цифрового рубля и улучшена структура DTO
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@@ -50,21 +50,10 @@ class GetQrcReversalDataRequest extends Request implements HasBody
|
||||
// <BELIEF_STATE "The `command` field specifies the operation to the SBP API. Other fields from the DTO are conditionally added, ensuring the payload precisely matches the API specification.">
|
||||
protected function defaultBody(): array
|
||||
{
|
||||
$body = [
|
||||
'command' => 'GetQRCreversalData',
|
||||
'TermNo' => $this->data->TermNo,
|
||||
'currency' => $this->data->currency,
|
||||
];
|
||||
|
||||
if ($this->data->qrcId !== null) $body['qrcId'] = $this->data->qrcId;
|
||||
if ($this->data->payrrn !== null) $body['payrrn'] = $this->data->payrrn;
|
||||
if ($this->data->trxId !== null) $body['trxId'] = $this->data->trxId;
|
||||
if ($this->data->trxDT !== null) $body['trxDT'] = $this->data->trxDT;
|
||||
if ($this->data->amount !== null) $body['amount'] = $this->data->amount;
|
||||
if ($this->data->messageID !== null) $body['messageID'] = $this->data->messageID;
|
||||
if ($this->data->ReturnRestAmount !== null) $body['ReturnRestAmount'] = $this->data->ReturnRestAmount;
|
||||
|
||||
return $body;
|
||||
return array_merge(
|
||||
['command' => 'GetQRCreversalData'],
|
||||
$this->data->toArray()
|
||||
);
|
||||
}
|
||||
// </SECTION>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user