Skip to main content

Magento 2 : How to load the order success page in magento2

I have worked custom payment and iI've received the response from the payment iI need to load the success page from my custom controller how can i do it. Whether iI need to create own page or can iI use core function to load success page in my custom controller is that possible please help me

public function execute()
{

    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $order = $objectManager->create('\Magento\Sales\Model\Order') ->loadByIncrementId($orderId);
    $orderState = Order::STATE_PROCESSING;
    $order->setState($orderState)->setStatus(Order::STATE_PROCESSING);
    $order->save();
}

How to load the order success page in magento2

I have worked custom payment and i received the response from the payment i need to load the success page from my custom controller how can i do it. Whether i need to create own page or can i use core function to load success page in my custom controller is that possible please help me

public function execute()
{

    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $order = $objectManager->create('\Magento\Sales\Model\Order') ->loadByIncrementId($orderId);
    $orderState = Order::STATE_PROCESSING;
    $order->setState($orderState)->setStatus(Order::STATE_PROCESSING);
    $order->save();
}

Magento 2 : How to load the order success page

I have worked custom payment and I've received the response from the payment I need to load the success page from my custom controller how can i do it. Whether I need to create own page or can I use core function to load success page in my custom controller is that possible please help me

public function execute()
{

    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $order = $objectManager->create('\Magento\Sales\Model\Order') ->loadByIncrementId($orderId);
    $orderState = Order::STATE_PROCESSING;
    $order->setState($orderState)->setStatus(Order::STATE_PROCESSING);
    $order->save();
}
Source Link
Jeeva Chezhiyan
  • 1.5k
  • 3
  • 20
  • 39

How to load the order success page in magento2

I have worked custom payment and i received the response from the payment i need to load the success page from my custom controller how can i do it. Whether i need to create own page or can i use core function to load success page in my custom controller is that possible please help me

public function execute()
{

    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $order = $objectManager->create('\Magento\Sales\Model\Order') ->loadByIncrementId($orderId);
    $orderState = Order::STATE_PROCESSING;
    $order->setState($orderState)->setStatus(Order::STATE_PROCESSING);
    $order->save();
}