From 2b685f78ba695bcb69741157fad75dd157a90479 Mon Sep 17 00:00:00 2001 From: pero1203 Date: Tue, 23 Nov 2021 08:59:02 +0100 Subject: [PATCH] Popravek logiranja api klicev na frontendu --- .../payments/classes/class.ApiNarocilaController.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/payments/classes/class.ApiNarocilaController.php b/frontend/payments/classes/class.ApiNarocilaController.php index a4c970c07..29aeff900 100644 --- a/frontend/payments/classes/class.ApiNarocilaController.php +++ b/frontend/payments/classes/class.ApiNarocilaController.php @@ -36,8 +36,11 @@ class ApiNarocilaController{ // Logiramo response klica $SL = new SurveyLog(); - if($this->response['success'] == true){ - + // Napaka pri klicu + if(isset($this->response['success']) && $this->response['success'] == false){ + $SL->addMessage(SurveyLog::PAYMENT, "NAPAKA pri klicu za plačevanje ".$this->params['action'].": ".$this->response['error']); + } + else{ if(isset($this->data['email'])) $call_data = ', '.$this->data['email']; elseif(isset($this->data['narocilo_id'])) @@ -47,9 +50,6 @@ class ApiNarocilaController{ $SL->addMessage(SurveyLog::PAYMENT, "USPEŠEN KLIC (".$this->params['action'] . $call_data.")"); } - else{ - $SL->addMessage(SurveyLog::PAYMENT, "NAPAKA pri klicu za plačevanje ".$this->params['action'].": ".$this->response['error']); - } $SL->write();