private function createMagentoOrder(\Ess\M2ePro\Model\Order $order) { if ($order->canCreateMagentoOrder()) { try { $order->createMagentoOrder(); } catch (\Exception $exception) { return; } } if ($order->getChildObject()->canCreatePaymentTransaction()) { $order->getChildObject()->createPaymentTransactions(); } if ($order->getChildObject()->canCreateInvoice()) { $order->createInvoice(); } if ($order->getChildObject()->canCreateShipment()) { $order->createShipment(); } if ($order->getChildObject()->canCreateTracks()) { $order->getChildObject()->createTracks(); } $order->updateMagentoOrderStatus(); }