From 1ee4fd989313571ff182435d893ea477aaa47477 Mon Sep 17 00:00:00 2001 From: TheCartpenter <77865573+TheCartpenter@users.noreply.github.com> Date: Sun, 31 Dec 2023 17:34:42 -0500 Subject: [PATCH] Update cardinity.php --- upload/catalog/controller/extension/payment/cardinity.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/upload/catalog/controller/extension/payment/cardinity.php b/upload/catalog/controller/extension/payment/cardinity.php index a9e51fa3c..9076572ea 100644 --- a/upload/catalog/controller/extension/payment/cardinity.php +++ b/upload/catalog/controller/extension/payment/cardinity.php @@ -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)); @@ -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)); @@ -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']);