Transaction & TImeout

515 views
Skip to first unread message

Sandeep

unread,
Jul 24, 2009, 12:22:54 AM7/24/09
to jPOS Users
Hi All,

Suppose receive one cashwithdrawal transaction from ATM after
validating message i sent the request to Bank Host Application.
Suppose i want to set timeout as 1 minute.
Case 1) If Bank host application send response with in 1 minute then
switch will forward response to ATM.
Case 2) If Bank host application send response after 1 minute then for
that transaction i want generate reversal message. And switch already
sent TImeout message to ATM.

Issue:
1) Is there any way to set timeout?
2) How to generate reversal message

-- Sandeep

Mark Salter

unread,
Jul 24, 2009, 3:29:53 AM7/24/09
to jpos-...@googlegroups.com
Yes, but how will depend on your mechanism...
... a time-out is just a value, perhaps held in a configuration file
that specifies how many seconds or milliseconds you need to wait for a
response?

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

chhil

unread,
Jul 24, 2009, 3:46:03 AM7/24/09
to jpos-...@googlegroups.com
A slightly different model from Marks(just giving ideas)

Long time-out = 60000;
ISOMsg response = MUX.request(request, time-out);
if (response == null) {
// time-out - respond to ATM.
// Send reversal to Bank <---
} else {
// build and send response to ATM
}

When something arrives in your unhandled queue, send a repeat reversal
message. This way if a response message is lost then you have done
your due diligence of reversing the message.

-chhil

Mark Salter

unread,
Jul 24, 2009, 3:58:46 AM7/24/09
to jpos-...@googlegroups.com
chhil wrote:
> A slightly different model from Marks(just giving ideas)
8)

>
> Long time-out = 60000;
> ISOMsg response = MUX.request(request, time-out);
> if (response == null) {
> // time-out - respond to ATM.
> // Send reversal to Bank <---
> } else {
> // build and send response to ATM
> }
>
> When something arrives in your unhandled queue, send a repeat reversal
> message. This way if a response message is lost then you have done
> your due diligence of reversing the message.

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

chhil

unread,
Jul 24, 2009, 4:38:05 AM7/24/09
to jpos-...@googlegroups.com
You are correct about having to send something echoed from the
response in the reversal. It depends on the model used by the bank
i.e.
reverse transactions that are inflight (i.e. have not received a
response) or wait for a response and then reverse. But if the response
does not arrive, the customer may charged for money that it did not
get :-(.

Something Sandeep would need to look into and model his reversal behavior.

FYI : "belts and braces" http://www.phrases.org.uk/meanings/61250.html :-)


-chhil
Message has been deleted

Sandeep

unread,
Jul 24, 2009, 5:08:30 AM7/24/09
to jPOS Users
Thanks Mark & Chhil.

If any query i will post.

-- Sandeep

Andy Orrock

unread,
Jul 24, 2009, 8:06:23 AM7/24/09
to jpos-...@googlegroups.com
See also:

"Entirely TMI on Reversals and Duplicates":

http://www.andyorrock.com/2007/01/entirely_tmi_on.html

"Amounts and Reversals and Voids.  Oh My":

http://www.andyorrock.com/2008/07/amounts-and-rev.html

"Amounts and Reversals and Voids (continued)":

http://www.andyorrock.com/2008/07/amounts-and-r-1.html

Andy
Reply all
Reply to author
Forward
0 new messages