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 53f212a commit 1ee4fd9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions upload/catalog/controller/extension/payment/cardinity.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function send(): void {
'secret' => $this->config->get('payment_cardinity_secret')
];

$encryption = new \Encryption((int)$this->config->get('config_encryption'));
$encryption = new \Encryption();

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

Expand Down Expand Up @@ -166,7 +166,7 @@ public function threeDSecureForm(): void {
'secret' => $this->config->get('payment_cardinity_secret')
];

$encryption = new \Encryption((int)$this->config->get('config_encryption'));
$encryption = new \Encryption();

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

Expand Down Expand Up @@ -209,7 +209,9 @@ public function threeDSecureCallback(): void {
'secret' => $this->config->get('payment_cardinity_secret')
];

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

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

if (hash_equals($hash, $this->request->post['MD'])) {
$order = $this->model_extension_payment_cardinity->getOrder($encryption_data['order_id']);
Expand Down

0 comments on commit 1ee4fd9

Please sign in to comment.