cancel() public method

public cancel ( $msg = null )
コード例 #1
0
 public function cancel($runValidation = true)
 {
     if ($runValidation && !$this->validate()) {
         return false;
     }
     if ($this->_order->status !== Order::STATUS_UNSHIPPED) {
         return false;
     }
     if ($this->_order->payment !== Order::PAYMENT_OFFLINE) {
         return false;
     }
     return $this->_order->cancel($this->msg);
 }