This section will explain why the "PrestaShop shopping cart is not cleared after payment", most PrestaShop store owners and customers are confused by fthis symptom.
When the customer finishes payment, and is redirected back to the PrestaShop store, the customer's cart is still there but not cleared. This issue happens when the customer finishes payment and clicks "return to your merchant" store very quickly.
WHY WOULD THIS HAPPEN?
In order to understand how this would happen, you need to understand how the order is processed between the Paypal payment server and the PrestaShop store. Here is how the basic process flows:
Process from customer view:
1. Store redirects customer to the Paypal server
(A URL return to PreestaShop store is included in the data posted to Paypal)
2. Customer enters the required information and complets the payment.
3 Paypal shows the return URL (which is sent in step 1).
4. Customer clicks the return link which brings them back to PrestaShop.
5. PrestaShop displays the payment result.
Process from Paypal server and PrestaShop view:
After Step 2, above, the following process starts concurrently.
3. The Paypal server will validate customer payment and send the payment process back to the PrestaShop store.
4. PrestaShop receives validation information about the payment, creates the order, and sets the order status.
5. If payment status becomes "Payment Accepted", then the shopping cart will be cleared.
Please note, the above two processes are executed concurrently and independently, however both processes will complete in a few seconds.
So, if the Paypal server sends back confirmation very quickly, or customer waits for a few seconds (reading payment result and so on), then clicks "return to merchant", there will be no problem.
Sometimes, however, the customer returns to PrestaShop before the Paypal server can send back a "Confirmation" to PrestaShop. In this case, the customer "shopping cart not cleared" will occur.
Hopefully this will help you understand why the "shopping cart not cleared" message occurs.