As a financial payment switch and switch vendor, we need to be agile, adaptable and expandable to support different formats that are required by our customers. See The New Normal - for one of our more complex acquirer side integrations.
One of these initiatives consisted of developing an interface to switch incoming MethCheck Pseudoephedrine Inquiry transactions from the Point-of-Sale to OLS.Switch, and then switched out to another end-point for further processing.
While most message formats in the payment space follow the ISO-8583 standard, we do have many end-points that we need to interface with that are either fixed length or variable length, we call these FSD messages. In the MethCheck implementation we used a FSD based message format for request and response messages. Our role here was to pass a customer defined buffer from the POS system to the end-point, though our switch and pass a response buffer back to the POS system
FSD Request
<schema>
<field id="header" type="K" length="7">OLSMETH</field>
<field id="0" type="N" length="2"> <!--tran type -->
<field id="41" type="A" length="5"> <!--store number -->
<field id="46" type="N" length="19"> <!--tran id -->
<field id="meth-trans-info" type="AFS" length="452">
</schema>
FSD Response
<?xml version="1.0" encoding="UTF-8"?>
<schema>
<field id="header" type="K" length="7" >OLSMETH</field>
<field id="0" type="N" length="2" /> <!--tran type -->
<field id="41" type="A" length="5" /> <!--store number-->
<field id="46" type="N" length="19" /> <!--tran id-->
<field id="39" type="A" length="2"/> <!-- Result Code-->
<field id="meth-trans-reply" type="AFS" length="255" />
</schema>
We have a very easy way of creating and populating these messages.
FSDMsg fsd = new FSDMsg ("file:cfg/meth-");
FSDMsg msg = (FSDMsg) ctx.tget (REQUEST);
fsd.set ("0", msg.get("transaction-code"));
String storeNumber = msg.get ("store-number");
fsd.set ("41", storeNumber);
TranLog tranLog = (TranLog) ctx.tget (TRANLOG);
if (tranLog != null) {
fsd.set ("46", ISOUtil.zeropad (Long.toString(tranLog.getId().longValue()), 19 ));
}
StringBuffer sb = new StringBuffer();
sb.append (msg.get ("register-logon-nbr"));
sb.append (msg.get ("meth-entry-mode"));
sb.append (msg.get ("meth-id-format"));
sb.append (msg.get ("meth-id-data"));
sb.append (RS);
sb.append (msg.get ("meth-person-info"));
sb.append (RS);
fsd.set ("meth-trans-info", sb.toString());
In less then a week’s time in development (testing and user acceptance testing will take longer) - we were able to add an interface to our switch to handle this non-payment transaction type.