Пример #1
0
 /**
  *
  * extended function from parent Np_Method
  * 
  * @return mixed bool string reject reason code or TRUE (valid)
  */
 public function PostValidate()
 {
     $ret = parent::PostValidate();
     if ($ret !== true) {
         return $ret;
     }
     if ($this->getBodyField("NETWORK_TYPE") != Application_Model_General::getSettings("NetworkType")) {
         return "Chk18";
     }
     $inProcessArray = Application_Model_General::$inProcess;
     $inProcess = Application_Model_General::getFieldFromRequests('last_transaction', $this->getBodyField('NUMBER'));
     if (!empty($inProcess) && in_array($inProcess, $inProcessArray)) {
         return "Chk04";
     }
     $number = $this->getBodyField("NUMBER");
     if (!is_numeric($number) || strlen($number) < 8) {
         $this->setAck('Ack02');
         return false;
     }
     return true;
 }