first commit
This commit is contained in:
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user