Only click on OK right before you're about to enter the gym.Then your Ticket will be redeemed.
Ticket: