'Pending', self::STATUS_PENDING_PAYMENT => 'Pending Payment', self::STATUS_PURCHASE => 'Accepted', self::STATUS_SHIPPING => 'Shipping', self::STATUS_PROCESSING => 'Arrived', self::STATUS_COMPLETED => 'Completed', self::STATUS_CANCELED => 'Canceled', self::STATUS_CLOSED => 'Closed', self::STATUS_FRAUD => 'Fraud', ]; public function canSendShip(){ return $this->status === self::STATUS_PURCHASE; } public function canAccept(){ return $this->status === self::STATUS_PENDING; } /** * Checks if new invoice is allow or not * * @return bool */ public function canInvoice(): bool{ return $this->status === self::STATUS_SHIPPING && parent::canInvoice(); } /** * Checks if new shipment is allow or not * * @return bool */ public function canShip(): bool{ return $this->status === self::STATUS_SHIPPING && parent::canShip(); } }