In plain general terms, you need to be able to have your 'receive' time-out.
If you were using a jPos MUX, then you might have code:-
Long time-out = 60000;
ISOMsg response = MUX.request(request, time-out);
if (response == null) {
// time-out - respond to ATM.
} else {
// build and send response to ATM
}
'Elsewhere' you would monitor your unhandled queue of the MUX and if an
approval response arrives, you can build a reversal and send it to the
Bank. This processing will depend on the specification and needs of the
Bank, they could - for example - want a reversal for declines as well.
> 2) How to generate reversal message
You probably have two messages to send:-
- one to the ATM on realising the Bank host has not replied when your
receive time-out occurs - a decline, perhaps that also indicates that
the 'Issuer timed out'. The ATM system network specification will hold
the values and response message structure you will build.
- one to the Bank (*if* they finally respond with an approve), so that
they know their cardholder did not get any cash. This is a reversal -
as the approval is being reversed - as with the ATM, the Bank's network
specification will define what a reversal message looks like and which
fields from the request/response message should appear in your reversal
request message (and in which fields).
--
Mark
I quite like this belt and braces approach.
The ability to build a reversal at time-out *might* depend on the Bank's
message spec. They might want to see the authorisation code that is
being reversed; something that is not available until the late response
arrives?
--
Mark