How to Clear the Shopping Cart Session Variable
Coreysan
1,651
Reputation points
I'm learning to build a store in MVC Core 3.1, and everything works so far.
The Checkout button calls the CheckoutController Index method, where a javascript calls Paypal and finishes up the purchase.
However, I totally forgot to clear the shopping cart when the purchase is complete.
So far, it all ends when the Index view method is called, and that's it. So how do I put a line inside the view to clear the Shopping Cart,
or redirect maybe somewhere to do the work?