forked from apoloz/alfa-bank-sdk
first commit
This commit is contained in:
52
src/Sbp/Requests/CashLink/ActivateCashQrRequest.php
Normal file
52
src/Sbp/Requests/CashLink/ActivateCashQrRequest.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Sbp\Requests\CashLink;
|
||||
|
||||
use Gemini\AlfaBank\Sbp\Data\CashLink\ActivateCashQrRequestData;
|
||||
use Saloon\Contracts\Body\HasBody;
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Http\Response;
|
||||
use Saloon\Traits\Body\HasJsonBody;
|
||||
|
||||
class ActivateCashQrRequest extends Request implements HasBody
|
||||
{
|
||||
use HasJsonBody;
|
||||
|
||||
protected Method $method = Method::POST;
|
||||
|
||||
public function __construct(
|
||||
protected ActivateCashQrRequestData $data
|
||||
) {}
|
||||
|
||||
public function resolveEndpoint(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function defaultBody(): array
|
||||
{
|
||||
$body = [
|
||||
'command' => 'ActivateCashQRc',
|
||||
'TermNo' => $this->data->TermNo,
|
||||
'qrcId' => $this->data->qrcId,
|
||||
'amount' => $this->data->amount,
|
||||
'currency' => $this->data->currency,
|
||||
];
|
||||
|
||||
if ($this->data->OrderNumber !== null) $body['OrderNumber'] = $this->data->OrderNumber;
|
||||
if ($this->data->paymentPurpose !== null) $body['paymentPurpose'] = $this->data->paymentPurpose;
|
||||
if ($this->data->qrTtl !== null) $body['qrTtl'] = $this->data->qrTtl;
|
||||
if ($this->data->redirectUrl !== null) $body['redirectUrl'] = $this->data->redirectUrl;
|
||||
if ($this->data->notificationUrl !== null) {
|
||||
$body['queryData'] = ['notificationUrl' => $this->data->notificationUrl];
|
||||
}
|
||||
|
||||
return $body;
|
||||
}
|
||||
|
||||
public function createDtoFromResponse(Response $response): array
|
||||
{
|
||||
return $response->json();
|
||||
}
|
||||
}
|
||||
50
src/Sbp/Requests/CashLink/ChangeAccountForCashQrRequest.php
Normal file
50
src/Sbp/Requests/CashLink/ChangeAccountForCashQrRequest.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Sbp\Requests\CashLink;
|
||||
|
||||
use Saloon\Contracts\Body\HasBody;
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Traits\Body\HasJsonBody;
|
||||
|
||||
class ChangeAccountForCashQrRequest extends Request implements HasBody
|
||||
{
|
||||
use HasJsonBody;
|
||||
|
||||
protected Method $method = Method::POST;
|
||||
|
||||
public function __construct(
|
||||
protected string $TermNo,
|
||||
protected string $qrcId,
|
||||
protected string $account,
|
||||
protected ?string $NewTermNo = null,
|
||||
protected ?string $NewMerchantId = null,
|
||||
protected ?string $redirectUrl = null,
|
||||
) {}
|
||||
|
||||
public function resolveEndpoint(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function defaultBody(): array
|
||||
{
|
||||
$body = [
|
||||
'command' => 'ChangeAccForCashQRc',
|
||||
'TermNo' => $this->TermNo,
|
||||
'qrcId' => $this->qrcId,
|
||||
'account' => $this->account,
|
||||
];
|
||||
|
||||
if ($this->NewTermNo !== null) $body['NewTermNo'] = $this->NewTermNo;
|
||||
if ($this->NewMerchantId !== null) $body['NewMerchantId'] = $this->NewMerchantId;
|
||||
if ($this->redirectUrl !== null) $body['redirectUrl'] = $this->redirectUrl;
|
||||
|
||||
return $body;
|
||||
}
|
||||
|
||||
public function createDtoFromResponse(\Saloon\Http\Response $response): array
|
||||
{
|
||||
return $response->json();
|
||||
}
|
||||
}
|
||||
39
src/Sbp/Requests/CashLink/ChangeTermNoForCashQrRequest.php
Normal file
39
src/Sbp/Requests/CashLink/ChangeTermNoForCashQrRequest.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Sbp\Requests\CashLink;
|
||||
|
||||
use Saloon\Contracts\Body\HasBody;
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Traits\Body\HasJsonBody;
|
||||
|
||||
class ChangeTermNoForCashQrRequest extends Request implements HasBody
|
||||
{
|
||||
use HasJsonBody;
|
||||
|
||||
protected Method $method = Method::POST;
|
||||
|
||||
public function __construct(
|
||||
protected string $TermNo,
|
||||
protected string $qrcId
|
||||
) {}
|
||||
|
||||
public function resolveEndpoint(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function defaultBody(): array
|
||||
{
|
||||
return [
|
||||
'command' => 'ChangeTermNoForCashQRc',
|
||||
'TermNo' => $this->TermNo,
|
||||
'qrcId' => $this->qrcId,
|
||||
];
|
||||
}
|
||||
|
||||
public function createDtoFromResponse(\Saloon\Http\Response $response): array
|
||||
{
|
||||
return $response->json();
|
||||
}
|
||||
}
|
||||
39
src/Sbp/Requests/CashLink/DeleteCashQrRequest.php
Normal file
39
src/Sbp/Requests/CashLink/DeleteCashQrRequest.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Sbp\Requests\CashLink;
|
||||
|
||||
use Saloon\Contracts\Body\HasBody;
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Traits\Body\HasJsonBody;
|
||||
|
||||
class DeleteCashQrRequest extends Request implements HasBody
|
||||
{
|
||||
use HasJsonBody;
|
||||
|
||||
protected Method $method = Method::POST;
|
||||
|
||||
public function __construct(
|
||||
protected string $TermNo,
|
||||
protected string $qrcId
|
||||
) {}
|
||||
|
||||
public function resolveEndpoint(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function defaultBody(): array
|
||||
{
|
||||
return [
|
||||
'command' => 'DelCashQRc',
|
||||
'TermNo' => $this->TermNo,
|
||||
'qrcId' => $this->qrcId,
|
||||
];
|
||||
}
|
||||
|
||||
public function createDtoFromResponse(\Saloon\Http\Response $response): array
|
||||
{
|
||||
return $response->json();
|
||||
}
|
||||
}
|
||||
43
src/Sbp/Requests/CashLink/GetCashQrHistoryRequest.php
Normal file
43
src/Sbp/Requests/CashLink/GetCashQrHistoryRequest.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Sbp\Requests\CashLink;
|
||||
|
||||
use Saloon\Contracts\Body\HasBody;
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Traits\Body\HasJsonBody;
|
||||
|
||||
class GetCashQrHistoryRequest extends Request implements HasBody
|
||||
{
|
||||
use HasJsonBody;
|
||||
|
||||
protected Method $method = Method::POST;
|
||||
|
||||
public function __construct(
|
||||
protected string $TermNo,
|
||||
protected string $qrcId,
|
||||
protected string $dateFrom,
|
||||
protected string $dateTo
|
||||
) {}
|
||||
|
||||
public function resolveEndpoint(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function defaultBody(): array
|
||||
{
|
||||
return [
|
||||
'command' => 'GetCashQrcId',
|
||||
'TermNo' => $this->TermNo,
|
||||
'qrcId' => $this->qrcId,
|
||||
'dateFrom' => $this->dateFrom,
|
||||
'dateTo' => $this->dateTo,
|
||||
];
|
||||
}
|
||||
|
||||
public function createDtoFromResponse(\Saloon\Http\Response $response): array
|
||||
{
|
||||
return $response->json();
|
||||
}
|
||||
}
|
||||
39
src/Sbp/Requests/CashLink/GetCashQrStatusRequest.php
Normal file
39
src/Sbp/Requests/CashLink/GetCashQrStatusRequest.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Sbp\Requests\CashLink;
|
||||
|
||||
use Saloon\Contracts\Body\HasBody;
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Traits\Body\HasJsonBody;
|
||||
|
||||
class GetCashQrStatusRequest extends Request implements HasBody
|
||||
{
|
||||
use HasJsonBody;
|
||||
|
||||
protected Method $method = Method::POST;
|
||||
|
||||
public function __construct(
|
||||
protected string $TermNo,
|
||||
protected string $qrcId
|
||||
) {}
|
||||
|
||||
public function resolveEndpoint(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function defaultBody(): array
|
||||
{
|
||||
return [
|
||||
'command' => 'GetCashQRCstatus',
|
||||
'TermNo' => $this->TermNo,
|
||||
'qrcId' => $this->qrcId,
|
||||
];
|
||||
}
|
||||
|
||||
public function createDtoFromResponse(\Saloon\Http\Response $response): array
|
||||
{
|
||||
return $response->json();
|
||||
}
|
||||
}
|
||||
48
src/Sbp/Requests/CashLink/RegCashQrRequest.php
Normal file
48
src/Sbp/Requests/CashLink/RegCashQrRequest.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Sbp\Requests\CashLink;
|
||||
|
||||
use Gemini\AlfaBank\Sbp\Data\CashLink\RegCashQrRequestData;
|
||||
use Gemini\AlfaBank\Sbp\Data\CashLink\RegCashQrResponseData;
|
||||
use Saloon\Contracts\Body\HasBody;
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Http\Response;
|
||||
use Saloon\Traits\Body\HasJsonBody;
|
||||
|
||||
class RegCashQrRequest extends Request implements HasBody
|
||||
{
|
||||
use HasJsonBody;
|
||||
|
||||
protected Method $method = Method::POST;
|
||||
|
||||
public function __construct(
|
||||
protected RegCashQrRequestData $data
|
||||
) {}
|
||||
|
||||
public function resolveEndpoint(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function defaultBody(): array
|
||||
{
|
||||
$body = [
|
||||
'command' => 'RegCashQRc',
|
||||
'TermNo' => $this->data->TermNo,
|
||||
];
|
||||
|
||||
if ($this->data->mediaType !== null) $body['mediaType'] = $this->data->mediaType;
|
||||
if ($this->data->width !== null) $body['width'] = $this->data->width;
|
||||
if ($this->data->height !== null) $body['height'] = $this->data->height;
|
||||
if ($this->data->redirectUrl !== null) $body['redirectUrl'] = $this->data->redirectUrl;
|
||||
if ($this->data->qrcId !== null) $body['qrcId'] = $this->data->qrcId;
|
||||
|
||||
return $body;
|
||||
}
|
||||
|
||||
public function createDtoFromResponse(Response $response): RegCashQrResponseData
|
||||
{
|
||||
return RegCashQrResponseData::from($response->json());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Sbp\Requests\DigitalRuble\CashLink;
|
||||
|
||||
use Gemini\AlfaBank\Sbp\Data\DigitalRuble\CashLink\ChangeAccForCashUniQrRequestData;
|
||||
use Gemini\AlfaBank\Sbp\Data\DigitalRuble\CashLink\ChangeAccForCashUniQrResponseData;
|
||||
use Saloon\Contracts\Body\HasBody;
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Http\Response;
|
||||
use Saloon\Traits\Body\HasJsonBody;
|
||||
|
||||
class ChangeAccForCashUniQrRequest extends Request implements HasBody
|
||||
{
|
||||
use HasJsonBody;
|
||||
|
||||
protected Method $method = Method::POST;
|
||||
|
||||
public function __construct(
|
||||
protected ChangeAccForCashUniQrRequestData $data
|
||||
) {}
|
||||
|
||||
public function resolveEndpoint(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function defaultBody(): array
|
||||
{
|
||||
$body = [
|
||||
'command' => 'ChangeAccForCashUniQr',
|
||||
'TermNo' => $this->data->TermNo,
|
||||
];
|
||||
|
||||
if ($this->data->messageID !== null) $body['messageID'] = $this->data->messageID;
|
||||
if ($this->data->qrcId !== null) $body['qrcId'] = $this->data->qrcId;
|
||||
if ($this->data->account !== null) $body['account'] = $this->data->account;
|
||||
if ($this->data->accountDR !== null) $body['accountDR'] = $this->data->accountDR;
|
||||
if ($this->data->NewTermNo !== null) $body['NewTermNo'] = $this->data->NewTermNo;
|
||||
if ($this->data->NewMerchantId !== null) $body['NewMerchantId'] = $this->data->NewMerchantId;
|
||||
if ($this->data->redirectUrl !== null) $body['redirectUrl'] = $this->data->redirectUrl;
|
||||
if ($this->data->paymentPageUrl !== null) $body['paymentPageUrl'] = $this->data->paymentPageUrl;
|
||||
if ($this->data->fraudScore !== null) $body['fraudScore'] = $this->data->fraudScore;
|
||||
|
||||
return $body;
|
||||
}
|
||||
|
||||
public function createDtoFromResponse(Response $response): ChangeAccForCashUniQrResponseData
|
||||
{
|
||||
return ChangeAccForCashUniQrResponseData::from($response->json());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Sbp\Requests\DigitalRuble\CashLink;
|
||||
|
||||
use Gemini\AlfaBank\Sbp\Data\DigitalRuble\CashLink\CreateCashUniQrRequestData;
|
||||
use Gemini\AlfaBank\Sbp\Data\DigitalRuble\CashLink\CreateCashUniQrResponseData;
|
||||
use Saloon\Contracts\Body\HasBody;
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Http\Response;
|
||||
use Saloon\Traits\Body\HasJsonBody;
|
||||
|
||||
class CreateCashUniQrRequest extends Request implements HasBody
|
||||
{
|
||||
use HasJsonBody;
|
||||
|
||||
protected Method $method = Method::POST;
|
||||
|
||||
public function __construct(
|
||||
protected CreateCashUniQrRequestData $data
|
||||
) {}
|
||||
|
||||
public function resolveEndpoint(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function defaultBody(): array
|
||||
{
|
||||
$body = [
|
||||
'command' => 'ReqCashUniQr',
|
||||
'TermNo' => $this->data->TermNo,
|
||||
];
|
||||
|
||||
if ($this->data->messageID !== null) $body['messageID'] = $this->data->messageID;
|
||||
if ($this->data->redirectUrl !== null) $body['redirectUrl'] = $this->data->redirectUrl;
|
||||
if ($this->data->paymentPageUrl !== null) $body['paymentPageUrl'] = $this->data->paymentPageUrl;
|
||||
if ($this->data->mediaType !== null) $body['mediaType'] = $this->data->mediaType;
|
||||
if ($this->data->width !== null) $body['width'] = $this->data->width;
|
||||
if ($this->data->height !== null) $body['height'] = $this->data->height;
|
||||
if ($this->data->qrcId !== null) $body['qrcId'] = $this->data->qrcId;
|
||||
|
||||
if ($this->data->notificationUrl !== null) {
|
||||
$body['queryData'] = ['notificationUrl' => $this->data->notificationUrl];
|
||||
}
|
||||
|
||||
return $body;
|
||||
}
|
||||
|
||||
public function createDtoFromResponse(Response $response): CreateCashUniQrResponseData
|
||||
{
|
||||
return CreateCashUniQrResponseData::from($response->json());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Sbp\Requests\DigitalRuble\CashLink;
|
||||
|
||||
use Gemini\AlfaBank\Sbp\Data\DigitalRuble\CashLink\GetCashUniQrStatusRequestData;
|
||||
use Gemini\AlfaBank\Sbp\Data\DigitalRuble\CashLink\GetCashUniQrStatusResponseData;
|
||||
use Saloon\Contracts\Body\HasBody;
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Http\Response;
|
||||
use Saloon\Traits\Body\HasJsonBody;
|
||||
|
||||
class GetCashUniQrStatusRequest extends Request implements HasBody
|
||||
{
|
||||
use HasJsonBody;
|
||||
|
||||
protected Method $method = Method::POST;
|
||||
|
||||
public function __construct(
|
||||
protected GetCashUniQrStatusRequestData $data
|
||||
) {}
|
||||
|
||||
public function resolveEndpoint(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function defaultBody(): array
|
||||
{
|
||||
$body = [
|
||||
'command' => 'GetCashUniQrStatus',
|
||||
'TermNo' => $this->data->TermNo,
|
||||
'uniQrId' => $this->data->uniQrId,
|
||||
'paramsId' => $this->data->paramsId,
|
||||
];
|
||||
|
||||
if ($this->data->messageID !== null) $body['messageID'] = $this->data->messageID;
|
||||
if ($this->data->payrrn !== null) $body['payrrn'] = $this->data->payrrn;
|
||||
|
||||
return $body;
|
||||
}
|
||||
|
||||
public function createDtoFromResponse(Response $response): GetCashUniQrStatusResponseData
|
||||
{
|
||||
return GetCashUniQrStatusResponseData::from($response->json());
|
||||
}
|
||||
}
|
||||
62
src/Sbp/Requests/DigitalRuble/CreateUniQrRequest.php
Normal file
62
src/Sbp/Requests/DigitalRuble/CreateUniQrRequest.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Sbp\Requests\DigitalRuble;
|
||||
|
||||
use Gemini\AlfaBank\Sbp\Data\DigitalRuble\CreateUniQrRequestData;
|
||||
use Saloon\Contracts\Body\HasBody;
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Traits\Body\HasJsonBody;
|
||||
|
||||
class CreateUniQrRequest extends Request implements HasBody
|
||||
{
|
||||
use HasJsonBody;
|
||||
|
||||
protected Method $method = Method::POST;
|
||||
|
||||
public function __construct(
|
||||
protected CreateUniQrRequestData $data
|
||||
) {}
|
||||
|
||||
public function resolveEndpoint(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function defaultBody(): array
|
||||
{
|
||||
$body = [
|
||||
'command' => 'ReqUniQr',
|
||||
'TermNo' => $this->data->TermNo,
|
||||
'uniQrType' => $this->data->uniQrType,
|
||||
];
|
||||
|
||||
// Conditional mappings
|
||||
if ($this->data->amount !== null) $body['amount'] = $this->data->amount;
|
||||
if ($this->data->paymentPurpose !== null) $body['paymentPurpose'] = $this->data->paymentPurpose;
|
||||
if ($this->data->redirectUrl !== null) $body['redirectUrl'] = $this->data->redirectUrl;
|
||||
if ($this->data->paymentPageUrl !== null) $body['paymentPageUrl'] = $this->data->paymentPageUrl;
|
||||
if ($this->data->mediaType !== null) $body['mediaType'] = $this->data->mediaType;
|
||||
if ($this->data->width !== null) $body['width'] = $this->data->width;
|
||||
if ($this->data->height !== null) $body['height'] = $this->data->height;
|
||||
if ($this->data->qrTtl !== null) $body['qrTtl'] = $this->data->qrTtl;
|
||||
if ($this->data->messageID !== null) $body['messageID'] = $this->data->messageID;
|
||||
|
||||
$queryData = [];
|
||||
if ($this->data->notificationUrl !== null) $queryData['notificationUrl'] = $this->data->notificationUrl;
|
||||
if ($this->data->SenderFIO !== null) $queryData['SenderFIO'] = $this->data->SenderFIO;
|
||||
if ($this->data->SenderID !== null) $queryData['SenderID'] = $this->data->SenderID;
|
||||
if ($this->data->SenderBankBIC !== null) $queryData['SenderBankBIC'] = $this->data->SenderBankBIC;
|
||||
|
||||
if (!empty($queryData)) {
|
||||
$body['queryData'] = $queryData;
|
||||
}
|
||||
|
||||
return $body;
|
||||
}
|
||||
|
||||
public function createDtoFromResponse(\Saloon\Http\Response $response): array
|
||||
{
|
||||
return $response->json();
|
||||
}
|
||||
}
|
||||
39
src/Sbp/Requests/DigitalRuble/GetUniQrStatusRequest.php
Normal file
39
src/Sbp/Requests/DigitalRuble/GetUniQrStatusRequest.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Sbp\Requests\DigitalRuble;
|
||||
|
||||
use Saloon\Contracts\Body\HasBody;
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Traits\Body\HasJsonBody;
|
||||
|
||||
class GetUniQrStatusRequest extends Request implements HasBody
|
||||
{
|
||||
use HasJsonBody;
|
||||
|
||||
protected Method $method = Method::POST;
|
||||
|
||||
public function __construct(
|
||||
protected string $TermNo,
|
||||
protected array $uniQrIds, // Array of strings
|
||||
) {}
|
||||
|
||||
public function resolveEndpoint(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function defaultBody(): array
|
||||
{
|
||||
return [
|
||||
'command' => 'GetUniQrStatus',
|
||||
'TermNo' => $this->TermNo,
|
||||
'uniQrIds' => $this->uniQrIds,
|
||||
];
|
||||
}
|
||||
|
||||
public function createDtoFromResponse(\Saloon\Http\Response $response): array
|
||||
{
|
||||
return $response->json();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Sbp\Requests\DigitalRuble\Notifications;
|
||||
|
||||
use Gemini\AlfaBank\Sbp\Data\DigitalRuble\Notifications\PaymentDrNotificationData;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ParsePaymentDrNotification
|
||||
{
|
||||
public function execute(array $data): PaymentDrNotificationData
|
||||
{
|
||||
return PaymentDrNotificationData::from($data);
|
||||
}
|
||||
}
|
||||
69
src/Sbp/Requests/GetQrCodeRequest.php
Normal file
69
src/Sbp/Requests/GetQrCodeRequest.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Sbp\Requests;
|
||||
|
||||
use Gemini\AlfaBank\Sbp\Data\QrCodeRequestData;
|
||||
use Gemini\AlfaBank\Sbp\Data\QrCodeResponseData;
|
||||
use Saloon\Contracts\Body\HasBody;
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Http\Response;
|
||||
use Saloon\Traits\Body\HasJsonBody;
|
||||
|
||||
class GetQrCodeRequest extends Request implements HasBody
|
||||
{
|
||||
use HasJsonBody;
|
||||
|
||||
protected Method $method = Method::POST;
|
||||
|
||||
public function __construct(
|
||||
protected QrCodeRequestData $data
|
||||
) {}
|
||||
|
||||
public function resolveEndpoint(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function defaultBody(): array
|
||||
{
|
||||
$body = [
|
||||
'command' => 'GetQRCd',
|
||||
'TermNo' => $this->data->TermNo,
|
||||
'qrcType' => $this->data->qrcType,
|
||||
'currency' => $this->data->currency,
|
||||
];
|
||||
|
||||
// Common Fields
|
||||
if ($this->data->amount !== null) $body['amount'] = $this->data->amount;
|
||||
if ($this->data->paymentPurpose !== null) $body['paymentPurpose'] = $this->data->paymentPurpose;
|
||||
if ($this->data->redirectUrl !== null) $body['redirectUrl'] = $this->data->redirectUrl;
|
||||
if ($this->data->messageID !== null) $body['messageID'] = $this->data->messageID;
|
||||
if ($this->data->width !== null) $body['width'] = $this->data->width;
|
||||
if ($this->data->height !== null) $body['height'] = $this->data->height;
|
||||
|
||||
// Dynamic QR Fields
|
||||
if ($this->data->OrderNumber !== null) $body['OrderNumber'] = $this->data->OrderNumber;
|
||||
if ($this->data->qrTtl !== null) $body['qrTtl'] = $this->data->qrTtl;
|
||||
if ($this->data->subscriptionServiceId !== null) $body['subscriptionServiceId'] = $this->data->subscriptionServiceId;
|
||||
if ($this->data->subscriptionServiceName !== null) $body['subscriptionServiceName'] = $this->data->subscriptionServiceName;
|
||||
|
||||
// Query Data nesting
|
||||
$queryData = [];
|
||||
if ($this->data->notificationUrl !== null) $queryData['notificationUrl'] = $this->data->notificationUrl;
|
||||
if ($this->data->SenderFIO !== null) $queryData['SenderFIO'] = $this->data->SenderFIO;
|
||||
if ($this->data->SenderID !== null) $queryData['SenderID'] = $this->data->SenderID;
|
||||
if ($this->data->SenderBankBIC !== null) $queryData['SenderBankBIC'] = $this->data->SenderBankBIC;
|
||||
|
||||
if (!empty($queryData)) {
|
||||
$body['queryData'] = $queryData;
|
||||
}
|
||||
|
||||
return $body;
|
||||
}
|
||||
|
||||
public function createDtoFromResponse(Response $response): QrCodeResponseData
|
||||
{
|
||||
return QrCodeResponseData::from($response->json());
|
||||
}
|
||||
}
|
||||
45
src/Sbp/Requests/Management/BlockQrRequest.php
Normal file
45
src/Sbp/Requests/Management/BlockQrRequest.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Sbp\Requests\Management;
|
||||
|
||||
use Gemini\AlfaBank\Sbp\Data\Management\BlockQrRequestData;
|
||||
use Saloon\Contracts\Body\HasBody;
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Traits\Body\HasJsonBody;
|
||||
|
||||
class BlockQrRequest extends Request implements HasBody
|
||||
{
|
||||
use HasJsonBody;
|
||||
|
||||
protected Method $method = Method::POST;
|
||||
|
||||
public function __construct(
|
||||
protected BlockQrRequestData $data
|
||||
) {}
|
||||
|
||||
public function resolveEndpoint(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function defaultBody(): array
|
||||
{
|
||||
$body = [
|
||||
'command' => 'BlockQRcId',
|
||||
'TermNo' => $this->data->TermNo,
|
||||
'qrcId' => $this->data->qrcId,
|
||||
];
|
||||
|
||||
if ($this->data->reason !== null) {
|
||||
$body['reason'] = $this->data->reason;
|
||||
}
|
||||
|
||||
return $body;
|
||||
}
|
||||
|
||||
public function createDtoFromResponse(\Saloon\Http\Response $response): array
|
||||
{
|
||||
return $response->json();
|
||||
}
|
||||
}
|
||||
37
src/Sbp/Requests/Management/GetBlockedQrListRequest.php
Normal file
37
src/Sbp/Requests/Management/GetBlockedQrListRequest.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Sbp\Requests\Management;
|
||||
|
||||
use Saloon\Contracts\Body\HasBody;
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Traits\Body\HasJsonBody;
|
||||
|
||||
class GetBlockedQrListRequest extends Request implements HasBody
|
||||
{
|
||||
use HasJsonBody;
|
||||
|
||||
protected Method $method = Method::POST;
|
||||
|
||||
public function __construct(
|
||||
protected string $TermNo
|
||||
) {}
|
||||
|
||||
public function resolveEndpoint(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function defaultBody(): array
|
||||
{
|
||||
return [
|
||||
'command' => 'GetBlockedQRcIdList',
|
||||
'TermNo' => $this->TermNo,
|
||||
];
|
||||
}
|
||||
|
||||
public function createDtoFromResponse(\Saloon\Http\Response $response): array
|
||||
{
|
||||
return $response->json();
|
||||
}
|
||||
}
|
||||
39
src/Sbp/Requests/Management/UnblockQrRequest.php
Normal file
39
src/Sbp/Requests/Management/UnblockQrRequest.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Sbp\Requests\Management;
|
||||
|
||||
use Gemini\AlfaBank\Sbp\Data\Management\BlockQrRequestData;
|
||||
use Saloon\Contracts\Body\HasBody;
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Traits\Body\HasJsonBody;
|
||||
|
||||
class UnblockQrRequest extends Request implements HasBody
|
||||
{
|
||||
use HasJsonBody;
|
||||
|
||||
protected Method $method = Method::POST;
|
||||
|
||||
public function __construct(
|
||||
protected BlockQrRequestData $data
|
||||
) {}
|
||||
|
||||
public function resolveEndpoint(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function defaultBody(): array
|
||||
{
|
||||
return [
|
||||
'command' => 'UnblockQRcId',
|
||||
'TermNo' => $this->data->TermNo,
|
||||
'qrcId' => $this->data->qrcId,
|
||||
];
|
||||
}
|
||||
|
||||
public function createDtoFromResponse(\Saloon\Http\Response $response): array
|
||||
{
|
||||
return $response->json();
|
||||
}
|
||||
}
|
||||
44
src/Sbp/Requests/Registry/GetBankListRequest.php
Normal file
44
src/Sbp/Requests/Registry/GetBankListRequest.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Sbp\Requests\Registry;
|
||||
|
||||
use Gemini\AlfaBank\Sbp\Data\Registry\GetBankListResponseData;
|
||||
use Saloon\Contracts\Body\HasBody;
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Http\Response;
|
||||
use Saloon\Traits\Body\HasJsonBody;
|
||||
|
||||
class GetBankListRequest extends Request implements HasBody
|
||||
{
|
||||
use HasJsonBody;
|
||||
|
||||
protected Method $method = Method::POST;
|
||||
|
||||
public function __construct(
|
||||
protected ?string $messageID = null,
|
||||
protected ?string $BankMemberIdFilter = null
|
||||
) {}
|
||||
|
||||
public function resolveEndpoint(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function defaultBody(): array
|
||||
{
|
||||
$body = [
|
||||
'command' => 'GetBankList',
|
||||
];
|
||||
|
||||
if ($this->messageID !== null) $body['messageID'] = $this->messageID;
|
||||
if ($this->BankMemberIdFilter !== null) $body['BankMemberIdFilter'] = $this->BankMemberIdFilter;
|
||||
|
||||
return $body;
|
||||
}
|
||||
|
||||
public function createDtoFromResponse(Response $response): GetBankListResponseData
|
||||
{
|
||||
return GetBankListResponseData::from($response->json());
|
||||
}
|
||||
}
|
||||
51
src/Sbp/Requests/Reversal/GetQrcReversalDataRequest.php
Normal file
51
src/Sbp/Requests/Reversal/GetQrcReversalDataRequest.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Sbp\Requests\Reversal;
|
||||
|
||||
use Gemini\AlfaBank\Sbp\Data\Reversal\GetQrcReversalDataRequestData;
|
||||
use Gemini\AlfaBank\Sbp\Data\Reversal\GetQrcReversalDataResponseData;
|
||||
use Saloon\Contracts\Body\HasBody;
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Http\Response;
|
||||
use Saloon\Traits\Body\HasJsonBody;
|
||||
|
||||
class GetQrcReversalDataRequest extends Request implements HasBody
|
||||
{
|
||||
use HasJsonBody;
|
||||
|
||||
protected Method $method = Method::POST;
|
||||
|
||||
public function __construct(
|
||||
protected GetQrcReversalDataRequestData $data
|
||||
) {}
|
||||
|
||||
public function resolveEndpoint(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public function createDtoFromResponse(Response $response): GetQrcReversalDataResponseData
|
||||
{
|
||||
return GetQrcReversalDataResponseData::from($response->json());
|
||||
}
|
||||
}
|
||||
47
src/Sbp/Requests/Reversal/GetQrcReversalStatusRequest.php
Normal file
47
src/Sbp/Requests/Reversal/GetQrcReversalStatusRequest.php
Normal 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());
|
||||
}
|
||||
}
|
||||
52
src/Sbp/Requests/Reversal/QrcReversalRequest.php
Normal file
52
src/Sbp/Requests/Reversal/QrcReversalRequest.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Sbp\Requests\Reversal;
|
||||
|
||||
use Gemini\AlfaBank\Sbp\Data\Reversal\QrcReversalRequestData;
|
||||
use Gemini\AlfaBank\Sbp\Data\Reversal\QrcReversalResponseData;
|
||||
use Saloon\Contracts\Body\HasBody;
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Http\Response;
|
||||
use Saloon\Traits\Body\HasJsonBody;
|
||||
|
||||
class QrcReversalRequest extends Request implements HasBody
|
||||
{
|
||||
use HasJsonBody;
|
||||
|
||||
protected Method $method = Method::POST;
|
||||
|
||||
public function __construct(
|
||||
protected QrcReversalRequestData $data
|
||||
) {}
|
||||
|
||||
public function resolveEndpoint(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function defaultBody(): array
|
||||
{
|
||||
$body = [
|
||||
'command' => 'QRCreversal',
|
||||
'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->notificationUrl !== null) $body['queryData'] = ['notificationUrl' => $this->data->notificationUrl];
|
||||
if ($this->data->ReturnRestAmount !== null) $body['ReturnRestAmount'] = $this->data->ReturnRestAmount;
|
||||
|
||||
return $body;
|
||||
}
|
||||
|
||||
public function createDtoFromResponse(Response $response): QrcReversalResponseData
|
||||
{
|
||||
return QrcReversalResponseData::from($response->json());
|
||||
}
|
||||
}
|
||||
46
src/Sbp/Requests/Status/GetQrcStatusRequest.php
Normal file
46
src/Sbp/Requests/Status/GetQrcStatusRequest.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Sbp\Requests\Status;
|
||||
|
||||
use Gemini\AlfaBank\Sbp\Data\Status\GetQrcStatusRequestData;
|
||||
use Gemini\AlfaBank\Sbp\Data\Status\GetQrcStatusResponseData;
|
||||
use Saloon\Contracts\Body\HasBody;
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Http\Response;
|
||||
use Saloon\Traits\Body\HasJsonBody;
|
||||
|
||||
class GetQrcStatusRequest extends Request implements HasBody
|
||||
{
|
||||
use HasJsonBody;
|
||||
|
||||
protected Method $method = Method::POST;
|
||||
|
||||
public function __construct(
|
||||
protected GetQrcStatusRequestData $data
|
||||
) {}
|
||||
|
||||
public function resolveEndpoint(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function defaultBody(): array
|
||||
{
|
||||
$body = [
|
||||
'command' => 'GetQRCstatus',
|
||||
'TermNo' => $this->data->TermNo,
|
||||
];
|
||||
|
||||
if ($this->data->qrcId !== null) $body['qrcId'] = $this->data->qrcId;
|
||||
if ($this->data->payrrn !== null) $body['payrrn'] = $this->data->payrrn;
|
||||
if ($this->data->messageID !== null) $body['messageID'] = $this->data->messageID;
|
||||
|
||||
return $body;
|
||||
}
|
||||
|
||||
public function createDtoFromResponse(Response $response): GetQrcStatusResponseData
|
||||
{
|
||||
return GetQrcStatusResponseData::from($response->json());
|
||||
}
|
||||
}
|
||||
46
src/Sbp/Requests/Subscription/GetQrSubStatusRequest.php
Normal file
46
src/Sbp/Requests/Subscription/GetQrSubStatusRequest.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Sbp\Requests\Subscription;
|
||||
|
||||
use Saloon\Contracts\Body\HasBody;
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Traits\Body\HasJsonBody;
|
||||
|
||||
class GetQrSubStatusRequest extends Request implements HasBody
|
||||
{
|
||||
use HasJsonBody;
|
||||
|
||||
protected Method $method = Method::POST;
|
||||
|
||||
public function __construct(
|
||||
protected string $TermNo,
|
||||
protected string $qrcId,
|
||||
protected ?string $RQperiod = null
|
||||
) {}
|
||||
|
||||
public function resolveEndpoint(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function defaultBody(): array
|
||||
{
|
||||
$body = [
|
||||
'command' => 'GetQRCSubStatus',
|
||||
'TermNo' => $this->TermNo,
|
||||
'qrcId' => $this->qrcId,
|
||||
];
|
||||
|
||||
if ($this->RQperiod !== null) {
|
||||
$body['RQperiod'] = $this->RQperiod;
|
||||
}
|
||||
|
||||
return $body;
|
||||
}
|
||||
|
||||
public function createDtoFromResponse(\Saloon\Http\Response $response): array
|
||||
{
|
||||
return $response->json();
|
||||
}
|
||||
}
|
||||
44
src/Sbp/Requests/Subscription/QrcSubPayPetitionRequest.php
Normal file
44
src/Sbp/Requests/Subscription/QrcSubPayPetitionRequest.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Sbp\Requests\Subscription;
|
||||
|
||||
use Saloon\Contracts\Body\HasBody;
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Http\Response;
|
||||
use Saloon\Traits\Body\HasJsonBody;
|
||||
|
||||
class QrcSubPayPetitionRequest extends Request implements HasBody
|
||||
{
|
||||
use HasJsonBody;
|
||||
|
||||
protected Method $method = Method::POST;
|
||||
|
||||
public function __construct(
|
||||
protected string $TermNo,
|
||||
protected string $subscriptionToken,
|
||||
protected string $SenderMemberId,
|
||||
protected string $qrcId,
|
||||
) {}
|
||||
|
||||
public function resolveEndpoint(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function defaultBody(): array
|
||||
{
|
||||
return [
|
||||
'command' => 'QRCSubPayPetition',
|
||||
'TermNo' => $this->TermNo,
|
||||
'subscriptionToken' => $this->subscriptionToken,
|
||||
'SenderMemberId' => $this->SenderMemberId,
|
||||
'qrcId' => $this->qrcId,
|
||||
];
|
||||
}
|
||||
|
||||
public function createDtoFromResponse(Response $response): array
|
||||
{
|
||||
return $response->json();
|
||||
}
|
||||
}
|
||||
51
src/Sbp/Requests/Subscription/RegQrSubRequest.php
Normal file
51
src/Sbp/Requests/Subscription/RegQrSubRequest.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
namespace Gemini\AlfaBank\Sbp\Requests\Subscription;
|
||||
|
||||
use Gemini\AlfaBank\Sbp\Data\Subscription\RegQrSubRequestData;
|
||||
use Saloon\Contracts\Body\HasBody;
|
||||
use Saloon\Enums\Method;
|
||||
use Saloon\Http\Request;
|
||||
use Saloon\Http\Response;
|
||||
use Saloon\Traits\Body\HasJsonBody;
|
||||
|
||||
class RegQrSubRequest extends Request implements HasBody
|
||||
{
|
||||
use HasJsonBody;
|
||||
|
||||
protected Method $method = Method::POST;
|
||||
|
||||
public function __construct(
|
||||
protected RegQrSubRequestData $data
|
||||
) {}
|
||||
|
||||
public function resolveEndpoint(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function defaultBody(): array
|
||||
{
|
||||
$body = [
|
||||
'command' => 'RegQRcSub',
|
||||
'TermNo' => $this->data->TermNo,
|
||||
'qrcType' => $this->data->qrcType,
|
||||
'subscriptionPurpose' => $this->data->subscriptionPurpose,
|
||||
'queryData' => [
|
||||
'notificationUrl' => $this->data->notificationUrl,
|
||||
],
|
||||
];
|
||||
|
||||
if ($this->data->qrTtl !== null) $body['qrTtl'] = $this->data->qrTtl;
|
||||
if ($this->data->redirectUrl !== null) $body['redirectUrl'] = $this->data->redirectUrl;
|
||||
if ($this->data->subscriptionServiceId !== null) $body['subscriptionServiceId'] = $this->data->subscriptionServiceId;
|
||||
if ($this->data->subscriptionServiceName !== null) $body['subscriptionServiceName'] = $this->data->subscriptionServiceName;
|
||||
|
||||
return $body;
|
||||
}
|
||||
|
||||
public function createDtoFromResponse(Response $response): array
|
||||
{
|
||||
return $response->json();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user