/** * @param Request\AbstractRequest $request * @param string $securityKey * * @return string */ public function generateHash(AbstractRequest $request, $securityKey) { $hashString = ''; $requestData = $request->toArray(); sort($this->hashParameters); foreach ($this->hashParameters as $key) { if (!array_key_exists($key, $requestData)) { continue; } $hashString .= $requestData[$key]; } $hashString .= $securityKey; return $this->hashProvider->hash($hashString); }
/** * @param \Spryker\Client\Payone\ClientApi\Request\AbstractRequest $container * * @return void */ protected function applyStandardParameter(AbstractRequest $container) { if ($container->getPortalid() === null) { $container->setPortalid($this->standardParameter->getPortalId()); } if ($container->getAid() === null) { $container->setAid($this->standardParameter->getAid()); } if ($container->getMid() === null) { $container->setMid($this->standardParameter->getMid()); } if ($container->getEncoding() === null) { $container->setEncoding($this->standardParameter->getEncoding()); } if ($container->getMode() === null) { $container->setMode($this->modeDetector->getMode()); } if ($container->getLanguage() === null) { $container->setLanguage($this->standardParameter->getLanguage()); } }