Refactoring Ticket Pay Script