Skip to content

Commit

Permalink
Update cardinity.php
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCartpenter authored Dec 31, 2023
1 parent 5a6839e commit 308d9fa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions upload/catalog/controller/extension/payment/cardinity.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ public function send(): void {
'secret' => $this->config->get('payment_cardinity_secret')
];

$hash = $this->encryption->encrypt($this->config->get('config_encryption'), json_encode($encryption_data));
$encryption = new \Encryption((int)$this->config->get('config_encryption'));

$hash = $encryption->encrypt((int)$this->config->get('config_encryption'), json_encode($encryption_data));

$json['3ds'] = [
'url' => $authorization_information->getUrl(),
Expand Down Expand Up @@ -164,7 +166,9 @@ public function threeDSecureForm(): void {
'secret' => $this->config->get('payment_cardinity_secret')
];

$hash = $this->encryption->encrypt($this->config->get('config_encryption'), json_encode($encryption_data));
$encryption = new \Encryption((int)$this->config->get('config_encryption'));

$hash = $encryption->encrypt((int)$this->config->get('config_encryption'), json_encode($encryption_data));

if (hash_equals($hash, $this->request->post['hash'])) {
$success = true;
Expand Down

0 comments on commit 308d9fa

Please sign in to comment.