/** * @param \Magento\Sales\Api\Data\OrderInterface $order * @return \Magento\Sales\Api\Data\OrderInterface * @throws \Exception */ public function place(\Magento\Sales\Api\Data\OrderInterface $order) { // transaction will be here //begin transaction try { $order->place(); return $this->orderRepository->save($order); //commit } catch (\Exception $e) { throw $e; //rollback; } }