I wonder HOW does it wait once the user has closed the browser
eShop is not dependant upon the user's browser being open. It is running on the site - not in the user's browser. It regularly checks to see if PayPal has responded with a Successful or failed transaction code.