Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0110034: removed unneccessary Todo #523

Merged
merged 2 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1922,25 +1922,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
Loading