/** * {@inheritdoc} */ public function process(OrderInterface $order) { if ($order->getShippingState() === ShipmentInterface::STATE_SHIPPED && !$order->isTrackingMail()) { $this->trackingMailer->sendMail($order); $order->setTrackingMail(true); } }
public function process(OrderInterface $order) { $order->setCheckoutState(OrderCheckoutStates::STATE_COMPLETED); $order->setShippingState(ShipmentInterface::STATE_PENDING); $order->setPaymentState(PaymentInterface::STATE_PENDING); $order->setState(OrderInterface::STATE_CONFIRMED); $order->setOrderedAt(new \DateTime()); $this->confirmMailer->sendMail($order); $this->cartProvider->abandonCart(); }