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();