I have issues with displaying the success page.Please see process flow below:

After PlaceOrder action, the customer is redirected to payment gateway and after transaction is completed, I redirected to a controller on magento site. This gives me opportunity to get th transaction status and save the details in a custom table.

My issue is after saving, and redirect to check_oneoage_success.xml, it gives me error "1 exception(s): Exception #0 (Magento\Framework\Exception\InputException): Id required", kindly assist.


If you are overriding Onepage success controller and implementing your custom logic, in this case you will not get LastOrderId in 'checkout_onepage_controller_success_action' event which is dispatched in the success action controller.

Thats why it is throwing 'Id required' input exceptions.

Avoid Overridding Onepage controller action

<preference for="Magento\Checkout\Controller\Onepage\Success" type="Arman\Checkout\Controller\Onepage\Success" />

Instead of integrating your specific peice of code in success controller, try to use observer checkout_onepage_controller_success_action which is being dispatched in success action controller and implement your logic in observer.

public function execute(\Magento\Framework\Event\Observer $observer)
        try {        
             $orderIds = $observer->getEvent()->getOrderIds();
                 //enter code here
        } catch (Exception $e) {


Hope, It will solve your problem, as I was getting the same error and it is solved for me with this approach

Screenshot for the Error

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.