Skip to content

Commit

Permalink
Merge pull request #523 from fatchip-Stefan/SW-451
Browse files Browse the repository at this point in the history
0110034: removed unneccessary Todo
  • Loading branch information
jvarelmann authored Jul 25, 2024
2 parents 78fb0d9 + 970199c commit 069c2dd
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1921,25 +1921,6 @@ protected function getParamAmount($basket, $userData)
}
}

/**
* hash iframe parameters
*
* @param array $request
* @return string
*/
protected function getParamHash($request)
{
$payoneConfig = Mopt_PayoneMain::getInstance()->getPayoneConfig();
ksort($request);

$hashString = '';
foreach ($request as $value) {
$hashString .= $value;
}

return md5($hashString .= $payoneConfig['apiKey']);
}

/**
* determine authorization method
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public function getEncoding()
*/
public function setKey($key)
{
$this->key = md5($key);
$this->key = hash('sha384', $key);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public function getEncoding()
*/
public function setKey($key)
{
$this->key = md5($key);
$this->key = hash('sha384', $key);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,6 @@ public function downloadMandateAction()
$params = $this->moptPayoneMain->getParamBuilder()->buildGetFile($this->getPaymentId(), Shopware()->Session()->moptMandateDataDownload);
$service = $this->payoneServiceBuilder->buildServiceManagementGetFile();
$request = new Payone_Api_Request_GetFile($params);
// TODO check why SHA-384 seems unsupported
// $generateHashService = $this->container->get('MoptPayoneBuilder')->buildServiceClientApiGenerateHash();
// $request->set('hash', $generateHashService->generate($request, $params['key']));

try {
$response = $service->getFile($request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ protected function moptPayoneCheckEnvironment($controllerName = false)

$payoneParams['mid'] = $creditCardConfig['merchant_id'];
$payoneParams['portalid'] = $creditCardConfig['portal_id'];
$payoneParams['key'] = md5($creditCardConfig['api_key']);
$payoneParams['key'] = hash('sha384', $creditCardConfig['api_key']);
$payoneParams['aid'] = $creditCardConfig['subaccount_id'];

if ($creditCardConfig['live_mode']) {
Expand Down

0 comments on commit 069c2dd

Please sign in to comment.