Implementing Transaction Manager

106 views
Skip to first unread message

cap10mycap10

unread,
Oct 6, 2021, 7:03:01 PM10/6/21
to jPOS Users

I am following the Implementing a JPOS Gateway and Customizing your Gateway Tutorials and I have been trying to implement the scenario below: 

with  <isomsg>
<field id="0" value="0800" />
<field id="11" value="000001" />
<field id="41" value="00000001" />
<field id="70" value="301" />
</isomsg>

The message is sent to JPOS AutoResponder which is fine but if I add a field 2 (Primary Account Number) with a value of 4111111111111111 (valid LUHN, configured BIN 411111), the message is not going where I want.  I want the message to be sent to a remote host but it appears its being sent to Jpos-AutoResponder.  Below are the XML files:

20_mymux.xml

<?xml version="1.0" ?>

<mux class="org.jpos.q2.iso.QMUX" logger="Q2" name="MYMUX">
<in>Server_1_NETWORK_OUT</in>
<out>Server_1_NETWORK_IN</out>
<ready>jpos-channel.ready</ready>
</mux>

10_myChannel.xml

<?xml version="1.0" ?>

<channel-adaptor name='jpos-channel' class="org.jpos.q2.iso.ChannelAdaptor" logger="Q2">
<channel class="org.jpos.iso.channel.NACChannel"
packager="org.jpos.iso.packager.PostPackager">
<property name="host" value="172.18.4.122" />
<property name="port" value="8452" />
</channel>
<in>Server_1_NETWORK_IN</in>
<out>Server_1_NETWORK_OUT</out>
<reconnect-delay>10000</reconnect-delay>
</channel-adaptor>


Trx_Mngr.xml

<?xml version='1.0'?>
<txnmgr class="org.jpos.transaction.TransactionManager" logger="Q2">
<property name="queue" value="TXNMGR"/>
<property name="sessions" value="2"/>
<property name="max-sessions" value="128"/>
<property name="debug" value="true"/>

<participant class="org.jpos.transaction.participant.QueryHost"/>
<participant class="org.jpos.transaction.participant.SendResponse"/>

<participant class="zw.co.jugaad.demotxmjpos.banking.SelectDestination">
<property name="bin.411111" value="MYMUX" />
</participant>
</txnmgr>

and the ISoMSg:

<isomsg>

         <field id="0" value="0200"/>
         <field id="2" value="4111111111111111" />
         <field id="3" value="540000"/>
         <field id="4" value="000000030000"/>
         <field id="7" value="1007211224"/>
         <field id="11" value="211224"/>
         <field id="12" value="211224"/>
         <field id="13" value="1007"/>
         <field id="35" value="411111" />
         <field id="37" value="YRBNFNT23"/>
         <field id="41" value="MONEY"/>
         <field id="42" value="263775091262"/>
         <field id="43" value="Settlement"/>
         <field id="49" value="932"/>
         <field id="102" value="1010370527"/>
         <field id="103" value="PL52571"/>
       </isomsg>
<isomsg>

and Response I am getting"

<isomsg>
  <!-- org.jpos.iso.packager.XMLPackager -->
  <field id="0" value="0210"/>
  <field id="2" value="4111111111111111"/>
  <field id="3" value="540000"/>
  <field id="4" value="000000030000"/>
  <field id="7" value="1007211224"/>
  <field id="11" value="211224"/>
  <field id="12" value="211224"/>
  <field id="13" value="1007"/>
  <field id="35" value="411111"/>
  <field id="37" value="YRBNFNT23"/>
  <field id="38" value="655460"/>
  <field id="39" value="00"/>
  <field id="41" value="MONEY"/>
  <field id="42" value="263775091262"/>
  <field id="43" value="Settlement"/>
  <field id="49" value="932"/>
  <field id="102" value="1010370527"/>
  <field id="103" value="PL52571"/>
</isomsg>

I have left out the other xml files for brevity as I have taken them as they are from the tutorial.  Any reason why I am not getting the expected behavior.

Regards

Andrés Alcarraz

unread,
Oct 6, 2021, 7:17:03 PM10/6/21
to jpos-...@googlegroups.com

Hi cap,

You are selecting the destination after sending the request through QueryHost:


    <participant class="org.jpos.transaction.participant.QueryHost"/>          <!--1-->
    <participant class="org.jpos.transaction.participant.SendResponse"/>

    <participant class="zw.co.jugaad.demotxmjpos.banking.SelectDestination">   <!--2-->        
<property name="bin.411111" value="MYMUX" />                                            
    </participant>

You need to move the SelectDestination participant to before the QueryHost one.

Hope this helps.

El 6/10/21 a las 18:03, cap10mycap10 escribió:

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/178d8ac4-7e18-4732-a780-10a1d60d7d71n%40googlegroups.com.

--
________________________________________
Andres Alcarraz - Senior Developer | Transactility, Inc. | Lima, Perú | e: a...@transactility.com | sk: alcarraz1976



cap10mycap10

unread,
Nov 5, 2021, 10:08:07 AM11/5/21
to jPOS Users
Thanks this helped.
Reply all
Reply to author
Forward
0 new messages