I am reworking an online ticketing system I created for a client to include some newer features. However, while I am reworking it I want to try and correct one of the minor flaws of the system.

Currently, this is what happens:

* List all the shows where "ticket_count > 0"
* Allow user to select show and fill out purchase information for it
* Once information is filled out properly, send to payment processor

However, the problem is that when there are very few tickets left. Say there are 2 tickets left. Then, Person A visits the site and begins filling out their information to buy those tickets. However, then Person B comes to the site. Since Person A has not completed the purchase, the system still has 2 more tickets listed as available.

What needs to happen is something similar to TicketMaster - where tickets are "reserved" while the user fills out the information. However, I haven't a clue how to manage this.