diff --git a/magento-axepta/app/code/local/Magentix/Axepta/Model/Axepta.php b/magento-axepta/app/code/local/Magentix/Axepta/Model/Axepta.php index 006cc83..f2bc9be 100644 --- a/magento-axepta/app/code/local/Magentix/Axepta/Model/Axepta.php +++ b/magento-axepta/app/code/local/Magentix/Axepta/Model/Axepta.php @@ -126,6 +126,7 @@ class Magentix_Axepta_Model_Axepta 'Response', 'UserData', 'Capture', + 'MsgVer', 'OrderDesc', 'ReqID', 'Plain', @@ -156,7 +157,6 @@ class Magentix_Axepta_Model_Axepta 'Type', 'Plain', 'Custom', - 'MsgVer', 'billingAddress', 'shippingAddress', 'billToCustomer', diff --git a/magento-axepta/app/code/local/Magentix/Axepta/controllers/PaymentController.php b/magento-axepta/app/code/local/Magentix/Axepta/controllers/PaymentController.php index f568ba3..6e66bd3 100644 --- a/magento-axepta/app/code/local/Magentix/Axepta/controllers/PaymentController.php +++ b/magento-axepta/app/code/local/Magentix/Axepta/controllers/PaymentController.php @@ -195,7 +195,6 @@ public function webhookAction() } } catch (Exception $exception) { Mage::log($exception->getMessage(), Zend_Log::ERR, Magentix_Axepta_Helper_Data::AXEPTA_LOG_FILE); - Mage::log($this->getGatewayRequest(), Zend_Log::ERR, Magentix_Axepta_Helper_Data::AXEPTA_LOG_FILE); } } @@ -273,7 +272,6 @@ public function failureAction() $this->__('Your payment has failed. Please try again or choose another payment method.') ); Mage::log($exception->getMessage(), Zend_Log::ERR, Magentix_Axepta_Helper_Data::AXEPTA_LOG_FILE); - Mage::log($this->getGatewayRequest(), Zend_Log::ERR, Magentix_Axepta_Helper_Data::AXEPTA_LOG_FILE); } $this->_redirect('checkout/cart'); @@ -331,9 +329,9 @@ public function cancelAction() */ protected function getRequestedOrder() { - try { - $axeptaPayment = $this->getAxeptaPayment(); + $axeptaPayment = $this->getAxeptaPayment(); + try { $axeptaPayment->setSecretKey($this->getPaymentHelper()->getHMAC()); $axeptaPayment->setCryptKey($this->getPaymentHelper()->getCryptKey()); $axeptaPayment->setResponse($this->getGatewayRequest()); @@ -351,7 +349,15 @@ protected function getRequestedOrder() return $order; } catch (Exception $exception) { - Mage::log($exception->getMessage(), Zend_Log::ERR, Magentix_Axepta_Helper_Data::AXEPTA_LOG_FILE); + $logs = [ + 'Magentix_Axepta_PaymentController::getRequestedOrder', + $exception->getMessage(), + $this->getGatewayRequest(), + $axeptaPayment->getParams() + ]; + foreach ($logs as $message) { + Mage::log($message, Zend_Log::ERR, Magentix_Axepta_Helper_Data::AXEPTA_LOG_FILE); + } } return false;