Im in a custom controller tying to get the order info with checkout session. There is my code.
$order = $this->_checkoutSession->getLastRealOrder(); // Magento\Sales\Model\Order\Interceptor
$orderId = $order->getEntityId(); // null
$orderIncrementId = $order->getIncrementId(); // null
But actually Im getting null on $orderId and $orderIncrementId.
Seems like the order is not being correctly placed.