I need a PERL script that allows my website users to purchase products and which checks if a user has purchased when logged in.
## Deliverables
I need a system consisting of two PERL scripts:
1. A script that integrates (e.g. a plugin) into my websites (e.g. can take some parameters from my site) and allows to purchase a product through PayPal and then returns the user back to a dedicated site. The script should save the user data, purchase information and other customized data (such as expiration date) in a MySQL database. The script should also send an email to the user with puurchase information and login data.
2. A second login script that recognizes if a user has purchased a product or not - and if yes, if the product has expired or not. The user should have the option to stay logged in (e.g. through save session ID in database etc.) after the browser window has been closed.