I'm not sure this is a good question. That said, I don't know exactly what question I should be asking, so if I can just find out that piece of information, I think this will have been worthwhile...
At work, we have a machine that takes CC payments. The screen times out after 150 seconds, and if the CC gateway hasn't come back with an auth code at that point, the machine (stupidly) declares the transaction failed. The user is then apt to try again. Problem: the transaction may actually go through (or have already gone through), resulting in a double charge.
What would be an intelligent way to deal with this situation? We looked into voiding any transaction not already seen as successful at the point of timeout, but we need data from the response in order to do that. If we had the response, we wouldn't have a problem.