We are integrating 3rd party payment method. When returning from payment channel to return url, the session destroyed.
Any help will be appreciated. Thanks in advanced
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityYou can use this code :
$quote = $objectManager->create('Magento\Quote\Model\QuoteFactory')->create()->load($order->getQuoteId());
$quote->setReservedOrderId(null);
$quote->setIsActive(true);
$quote->removePayment();
$quote->save();
$this->checkoutSession->replaceQuote($quote);
$this->cart->setQuote($quote);
$this->checkoutSession->restoreQuote();
NOTE: do not use Object manager, but you need to use the magento standard to implement this code on the place where you want this one.
Where we will put this code Please can you explain ???
There is a samesite patch from Adobe Commerce (Magento) which is used to fix this issue.