public function actionView2()
 {
     //$client->soap_defencoding = 'UTF-8';
     if (isset($_GET["txnref"])) {
         //$trans_pay_status = $pay->response_code;
         $trans = array();
         $order = UtilityHelper::callGlobalPay($_GET["txnref"], $trans);
         if (!$order) {
             $this->render('view2', array('response' => "Error occured please try again later", 'error' => 1));
         } else {
             Yii::app()->user->setState('user_cart', NULL);
             $this->render('view2', array('response' => $trans, 'error' => 0, 'order' => $order));
         }
     }
 }
 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));
 }