I'm developing a new payment module, where the user moves to an external page for payment and then return to Zen cart where the order is completed. Nothing unusual here.

But the interface also has a deferred return mechanism. In case the customer fails to return back to the shop, then the payment completion information is send later and the payment module is expected to complete order at this point. The deferred return does not have any cookies or other session information.

How this can be implemented? Normal Zen cart operation with the late return is to notice that there is no session and direct user to the time out page.