I have a custom payment method, after successful payment; payment page return to a controller where it updates order status and truncate current cart items like this:
$this->quote->load($orders->getQuoteId()); $this->quote->setReservedOrderId(null); $this->quote->setIsActive(true); $this->quote->removePayment(); $this->quote->save(); $this->cart->truncate(); $this->cart->saveQuote();
$this->quote is object of
$this->cart is object of
The cart is truncating properly, but the cart summery count is still appearing on header, and when I go to view cart, it is showing empty cart with previous order total, as shown in image below
My question is, how can I fully empty my cart data after successful payment?