Use a pop-up minicart for PayPal Add to Cart and View Cart buttons
This pop-up minicart needs Javascript to run. If your visitors disable Javascript in their browsers, the original PayPal Add to Cart will be used.
We assume that you have a page with PayPal Add to Cart and View Cart buttons as follows:
Open the page and select "Insert" > "PayPal" > "Add PayPal Minicart" from the main menu.
Now when clicking on the "Add to Cart" button, the following cart will popup instead of opening a page in PayPal.
To clear the cart after successful payment, open the page that your customers will be taken to after successful checkout. For this example. It is "https://www.yourdomain.com/success.html. Then select "Insert" > "PayPal" > "Add PayPal Minicart (Reset)".