Popravek logiranja api klicev na frontendu

This commit is contained in:
pero1203 2021-11-23 08:59:02 +01:00
parent 7144cbc74e
commit 2b685f78ba

View File

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