public function PostValidate() { $this->setAck($this->validateParams($this->getHeaders())); //first step is GEN if (!$this->checkDirection()) { return "Gen04"; } //HOW TO CHECK Gen05 // if (!$this->ValidateDB()) { // return "Gen07"; // } if (($timer_ack = Np_Timers::validate($this)) !== TRUE) { return $timer_ack; } $tbl = new Application_Model_DbTable_Requests(Np_Db::master()); $updateArray = array('last_transaction' => $this->getHeaderField("MSG_TYPE")); // if we received success return_response and we are not the initiator we need to publish it after (so leave it with status on) if ($this->getHeaderField("TO") == Application_Model_General::getSettings('InternalProvider')) { $updateArray['status'] = 0; } else { $updateArray['status'] = 1; } $whereArray = array('request_id =?' => $this->getHeaderField("REQUEST_ID")); if (!$tbl->update($updateArray, $whereArray)) { return false; } return true; }
public function PostValidate() { $this->setAck($this->validateParams($this->getHeaders())); //first step is GEN if (!$this->checkDirection()) { return "Gen04"; } //HOW TO CHECK Gen05 // if (!$this->ValidateDB()) { // return "Gen07"; // } if (($timer_ack = Np_Timers::validate($this)) !== TRUE) { return $timer_ack; } return true; }
/** * overridden from np_method * * @return mixed string Reject Reason Code or TRUE */ public function PostValidate() { $this->setAck($this->validateParams($this->getHeaders())); //HOW TO CHECK Gen05 if (!$this->ValidateDB()) { return "Gen07"; } $providers = Application_Model_General::getProviderArray(true); if (!in_array($this->getBodyField('DONOR'), $providers)) { return 'Pub05'; } if (($timer_ack = Np_Timers::validate($this)) !== TRUE) { return $timer_ack; } return true; }
/** * sets ack code in body field using validate params * post validation checks for general soap field errors * * @return mixed String or BOOL */ public function PostValidate() { $this->setAck($this->validateParams($this->getHeaders())); //first step is GEN if (!$this->checkDirection()) { return "Gen04"; } if (!$this->ValidateDB()) { return "Gen07"; } if (($timer_ack = Np_Timers::validate($this)) !== TRUE) { $timers_array = array('T2DR1', 'T2DR2', 'T3DR1', 'T3RK1', 'T3DR1U', 'T3RK1', 'T3RK2', 'T3DR1D', 'T3RK3', 'T3KR', 'T4DR0', 'T4DR1', 'T4DR11', 'T4DR2', 'T4DR3', 'T4RR1', 'T4RR11', 'T4OR1', 'T4OR11', 'T4RO1', 'TNP', 'TNP1', 'TNP2', 'TNP3', 'TNP4', 'TNPS', 'TNPB', 'T5BA2', 'T5BA3', 'T5AO1', 'T5OR1', 'T5001', 'T5002', 'T5003', 'TACK1', 'TACK2', 'TRES2', 'T5BA2', 'T5BA22', 'PNP1', 'PNP2', 'PNP3', 'PNP4', 'RACK3', 'N2DR4', 'PNP10', 'PNP4', 'RACK3'); if (in_array($timer_ack, $timers_array)) { Application_Model_General::writeToTimersActivity($this->getHeaders(), $timer_ack); } return $timer_ack; } return true; }