for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Cakasim\Payone\Sdk\Api\Message;
/**
* The implementation of the API request interface.
*
* @author Fabian Böttcher <[email protected]>
* @since 0.1.0
*/
class Request extends AbstractMessage implements RequestInterface
{
* Constructs the request with provided parameters.
* @param array $parameters The request parameters.
public function __construct(array $parameters)
$this->parameters = $parameters;
}
* @inheritDoc
public function getMerchantId(): ?string
return $this->getParameter('mid');
public function getPortalId(): ?string
return $this->getParameter('portalid');
public function getApiVersion(): ?string
return $this->getParameter('api_version');
public function getMode(): ?string
return $this->getParameter('mode');
protected function generateState(): array
$state = parent::generateState();
// Remove sensible API key information before serializing.
unset($state['key']);
return $state;
public function applyParameters(array $parameters): void
// Merge request parameters with provided parameters.
$this->parameters = array_merge($this->parameters, $parameters);
public function makeParameterArray(): array
return $this->parameters;