CODY CRAFTERS
Kangaroo Jackpots
Project Description
In this website, we've introduced a draw functionality that adds an exciting element for users. The 'Tickets' page lists various ticket pricing options. Users can purchase tickets, and upon purchase, they receive a confirmation email, assuring them of their inclusion in the draw. Their ticket details are securely stored in our backend system.
On the 'Draw' page, we've implemented a timer that displays the time remaining until the winner is announced. When the time arrives, we shuffle all the ticket numbers and randomly select one, which becomes the winner of the draw. We proudly showcase the winner's name on the page, along with the first three characters of their email to confirm their identity.
For the payment process, we've integrated WixPay as the payment processor. We save the purchased tickets in the form of an array in our database. At the time of announcing the winner, we collect all the ticket numbers from the various arrays, shuffle them, and pick just one ticket number. We then cross-reference this number with the buyer's information to display the winner's name on the page.