I am looking for a PHP script which will enable me to open a lottery website based on the following idea:
I put several items (up to 5) in the game. Every item has a priced defined by a number(of tickets to its lottery). Every ticket has a price(in USD).
Visitors will have to sign up and log in in order to be able to buy tickets to their item of choice. Every user has to be able to view it’s active tickets and past tickets, as well as their (possible) past prizes inside their account.
Visitors should also be able to view how many tickets have been already bought for the respective items(without logging in).
When all the tickets for one item will have been bought the users will not have the ability to buy anymore tickets for that respective item. At this point I will use a random number generator to decide the winner and award him(this has nothing to do with the script I want, I will take care of this).
After the respective item has been awarded I want to have the possibility to renew it or to replace with another item.
The website also has to feature some kind of shopping cart so that users might be able to buy multiple tickets for multiple items and then check out. I want to be able to offer discount of certain amount based on the number of tickets bought during one checkout. I also want to have the possibility to use coupon codes so that I will be able to give away free codes(based on one time usable coupons) or to offer more discounts(by multiple use coupon codes).
Mandatory payment options: PayPal, VISA, MasterCard and Maestro. Other means of payment integrated will be greatly appreciated.
So it’s pretty basic. The main idea is to be secure.
Please let me know if you can do this! Thank you!
PS: after doing some research on the web I found this website http://www.winyoursupercar.com/ which is the closest to what I want(bout 70% :D).