Exemplo n.º 1
0
 /**
  * Retunr if an order can be processed
  * 
  * @return boolean
  */
 public function canProcess()
 {
     if ($this->persisted()) {
         return false;
     }
     if (!$this->_subscriber) {
         return false;
     }
     if (!$this->validateEntity()) {
         return false;
     }
     if (!$this->_subscriber->persisted() && !$this->_subscriber->validateEntity()) {
         return false;
     }
     if (!isset($this->_package)) {
         return false;
     }
     if (!isset($this->_payment_method)) {
         return false;
     }
     return true;
 }