You need to enable logging and see if PayPal is contacting the script. And you need to make sure emails can be successfully sent from your server (not as easy as it sounds).
If you want an easier method, just use FastSpring: https://wyday.com/limelm/help/automate-license-generation-with-fastspring/