Example #1
0
 public function process(OrderInterface $order)
 {
     $order->setCheckoutState(OrderCheckoutStates::STATE_CART);
     $order->setUser($this->getUser());
     if ($order->getNumber() === null) {
         $order->setNumber($this->generateNumber());
     }
     if ($order->getToken() === null) {
         $order->setToken($this->tokenGenerator->generate(40));
     }
 }