public function actionView($id) { $model = $this->loadModel($id, $this->modelName); //if($model->response_code == 'pending'){ $json = array(); if ($model->type == 'interswitch') { UtilityHelper::callInterswitch($model->reference_number, $json); } else { UtilityHelper::callGlobalPay($model->reference_number, $json); } //UtilityHelper::sendToLog($json); //} $model = $this->loadModel($id, $this->modelName); if (Yii::app()->getRequest()->getIsAjaxRequest()) { $this->renderPartial('_view', array('model' => $model), false, true); Yii::app()->end(); } $this->render('view', array('model' => $model)); }