I am implementing Hosted Checkout for Mastercard Payment Gateway (MPGS). A WebView (in Android client) invokes checkout javascript.
An order is created with a specific amount and presented to the user. The user has to make the payment by authorizing a credit or debit card. Each attempt at the payment creates a transaction which is linked to that order. See glossary for explanation of these terms.
From what I gather, a Session is a placeholder which contains all the relevant details about the different stages of the payment made.
There may be network issue which may lead the client into an inconsistent state. Now, I would want to know the timeout for this particular session so that I can have a schedule job pick up orders that have exceeded the timeout and query the result of the order using Retrieve Order. This timeout should be sufficient to infer that no future transactions can be done.
The session does timeout by providing an error:
{
"error": {
"cause": "INVALID_REQUEST",
"explanation": "Form Session not found or expired."
},
"result": "ERROR"
}
Strangely, I cannot find documentation regarding what this timeout value actually is. The timeout error is received after one hour of inactivity. If the session is being altered (I've tested by invoking Retrieve Session with intervals of 30 minutes), it seems to persist for 2 hours.