Exemplo n.º 1
0
 /**
  * send error to internal if happened directly 
  * @param type $errorCode
  * @return boolean
  */
 protected function SendErrorToInternal($errorCode = false)
 {
     if (Application_Model_General::isMsgResponse($this->request->getHeaderField('MSG_TYPE'))) {
         // don't send error on response
         return true;
     }
     $params = $this->data;
     // send the error as response to internal
     $params['MSG_TYPE'] = $this->request->getHeaderField('MSG_TYPE') . '_response';
     $params['STATUS'] = $errorCode;
     $params['APPROVAL_IND'] = 'N';
     $params['FROM'] = $params['FROM_PROVIDER'];
     $params['TO'] = $params['TO_PROVIDER'];
     $response = new Application_Model_Internal($params);
     $response->SendErrorToInternal($params);
 }