0

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

1
  • Do you want to reserve the cart session? Jul 29, 2021 at 6:14

3 Answers 3

1

You 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.

0

Where we will put this code Please can you explain ???

2
0

There is a samesite patch from Adobe Commerce (Magento) which is used to fix this issue.

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.