tags:

views:

51

answers:

1

I have a Python CGI handling a payment transaction. When the user submits the form, the CGI is called. After submission, the CGI takes a while to perform the credit card transaction. During that time, a user might hit the ESC or refresh button. Doing that will not "kill" the CGI, meaning, the script will keep running completing the transaction but the CGI's HTML output will never reach the client. This means the user will not know the transaction was completed. How can I solve this problem?

+3  A: 

Same as you should do with every POST: don't send output, but put the output in a session variable and redirect to a pure-GET request. This one looks in the session for messages, and clears+displays those.

Wim
Not sure I know what you mean... Can you direct me to some example?
1qazxsw2
http://en.wikipedia.org/wiki/Post/Redirect/Get
S.Lott
http://cwiki.apache.org/WW/redirect-after-post.html
S.Lott