Dear all,

I am trying to develop a payment module for a Greek bank that uses a simple redirection and I need your help in taking some difficult coding decisions:

The framework works like this:
The form in the checkout_confirmation page leads the user to the bank's site where she pays.

This bank redirects the user to an OK URL if the transaction is successful and some minutes AFTER that, it posts some confirmation variables to a confirmation URL-script that has to update the database. The last has nothing to do with the user. The transaction is between bank's server and the confirmation URL. However the OK url must check periodically the db and only if it sees the confirmation, then it must display the checkout_success page.
For periodic check I use ajax if js is enabled and just sleep() if js is disabled , BUT I need your help in coding the before_process() and .....
My biggest problem is decide where to call the checkout_process from. You see the confirmation URL does not contain session variables....it is between the bank and our server so I cannot just do a simple redirect at the end of the confirmation script. And if I put it at the end of the OK script then the user might just click stop or close the window after a minute or so, so the checkout_process will never be called...

I thank you so much in advance for your time and help

Regards to all
John