This topic provides tips for virtualizing ISO 8583 services.

Sections include:

Overview

ISO 8583 is a common interface by which financial transaction card originated messages may be interchanged between acquirers and card issuers.

Parasoft Virtualize can virtualize application behavior over ISO 8583 message types with a variety of message packaging configurations. Parasoft Virtualize allows the visual modeling of such messages as well as the visual configuration of correlation and dynamic response logic—including the use of data sources.

ISO 8583 messaging is supported across the built-in transports, such as HTTP or MQ. To send messages over the ISO 8583 transport, first install the ISO 8583 listener plugin, which is available for download on Parasoft Marketplace. This plugin uses the Extensibility API described in Using Custom Transports, Message Formats, and Tools for details.

Recording ISO 8583 Messages

If ISO 8583 messages are exchanged over HTTPS, MQ or JMS, you record them by using the related wizards. For details, see:

Recording over other transport channels is not currently supported.

Configuring Message Responders for ISO 8583

Configure an ISO 8583 Message Packager

Before you configure a Message Responder for ISO 8583, you need to select a suitable packager. To do this:

  1. Open the Message Responder configuration panel.
  2. In the Service Options tab, select ISO 8583 Packager and select a suitable packager. The available options are based on configurations provided by jPOS (www.jpos.org). Each configuration establishes the field Ids that are allowed in the message, and what data types and lengths they should have.
    Selecting Custom from the drop-down menu will enable you to browse to a packager file that is designed to describe your specific message configuration. Custom packagers are jPOS-based XML files. For examples of such packager files, see www.jpos.org. Various XML packagers configurations can be found at http://jpos.svn.sourceforge.net/viewvc/jpos/trunk/jpos6/modules/jpos/cfg/packager/.



Configure a Response Message

If a literal (text) representation of an ISO 8583 message is available, you can paste it into the Literal view of the Message Responder, then switch to the Form ISO 8583 view. If the provided message is inconsistent with the selected packager, then an error message is displayed and the conversion to the form view fails.

Alternatively, if a sample message is not available or the format is binary, then you can build the response message from scratch using the Form ISO 8583 view. This view contains separate tabs for defining the message body and the message header.


When a data source is available, field values in these tabs can be parameterized; see Parameterizing Tools with Data Source Values, Variables, and Extracted Values.

New fields can be added with the Add button. Select one or more fields (hold CTRL while selecting multiple fields) and click Remove in order to remove the selected fields. When a single field is selected, it can be dragged as well.

The order of fields when declared in any of the ISO 8583 Message views does not influence how the fields are actually sent. Fields are always sent in ascending order based on the numeric field ID. This is consistent with the ISO 8583 message specification. However, order can be a factored when scripting is used in terms of what values are initialized first. For more details, please see Scripting ISO 8583 Header Message Fields.

Message Sub-Tab

The following options are available in the Form ISO 8583 view:

  • Field ID: Enter a numeric value. Only values that have been declared by the message field configuration (or packager file) are allowed. However, it is possible to declare more fields in the packager than the ones actually used.
  • Value: When clicking on a a specific field value area, you can select between Fixed or Script. Parameterized is also an available option when a data source is visible from the responder.
  • Type: Allows the choice between String and Binary. When it is set as Binary, it indicates that the value contains the literal hexadecimal representation of the content where every two hex digits represent a single byte. String indicates that the value should be interpreted based on the type specified in the message packager for that particular field (the Message Field Configuration).
  • Description: (Optional) Allows you to specify a description of the message for clarity. This option does not affect the sent message in any way.
  • Use Data Source: Exclude with empty string: (Only visible when a data source is available). When the check box in this cell is selected, you may map the value to a data source column. As the responder iterates over the data source rows, it will either include or exclude the specified ISO field based on whether the data source row at that column is empty. Whenever the data source value is empty, the field will be excluded.

Header Sub-Tab

The Header tab can be used to configure a custom binary header for the ISO 8583 message. Header fields can rearranged (with drag and drop), and new fields can be added and removed with the corresponding buttons. Select multiple fields while holding CTRL in order to remove several fields at once. The overall size shown next to the buttons is the sum of all field sizes.

The following options can be configured in the Headers tab:

  • Name: Specifies the name of the header.
  • Value: When clicking on a a specific field value area, you can select between Fixed or Script. Parameterized is also an available option when a data source is visible from the responder.
  • Type: Specifies the data type for the header field. The available types influence how the content in the value cell is to be sent over the wire. The Binary (hex) option indicates that the value cell has a hex representation of the raw binary content and should be sent as is. The hex representation assumes two hexadecimal digits for every byte.
  • Size: Indicates the size of the field.
  • Exclusion: (Only visible when a data source is available). When the check box in this cell is selected, you may map the value to a data source column. As the responder iterates over the data source rows, it will either include or exclude the specified ISO field based on whether the data source row at that column is empty. Whenever the data source value is empty, the field will be excluded.

Scripting ISO 8583 Header Message Fields

When Script is selected in a value cell, you may write custom code to generate the field value. Examples of such usage is to encrypt content or generate MAC values.

The script methods will accept zero, one or two arguments.

When a single argument is declared, it references the ISOMsg object representation of the current request ISO 8583 message. The ISOMsg object will have its fields initialized up to the current field.

For example, if you are scripting the tenth field, then the ISOMsg object will set all prior 9 fields (if any) based with those field values. This is where rearranging ISO fields can make a difference—despite the fact that rearranging order does not influence the actual field order of the sent messages. When a second argument is declared, it will reference Context, which allows for accessing environment variables, data source values, etc.

For more details, see the Virtualize Extensibility API documentation. You can access documentation for the Extension framework API via the Parasoft> Help menu (look for the book titled "Parasoft Virtualize Extensibility API").

Configure Responder Correlation

If multiple Message Responders are used, you need to configure responder correlation as follows:

  1. In Message Responder’s Responder Correlation tab, open ISO 8583 Correlation.
  2. Select Enable correlation.
  3. Add field values to that list in order to determine which incoming messages should be processed by this Message Responder.
    • For example, if you provide Field ID 0 with the value 0200, then you are adding a correlation criterion that retrieves the value of field 0 from the incoming ISO 8583 messages and compares it against 0200. If the incoming value matches 0200, then the responder is used to respond to this message. If it does not match, then evaluation is performed on the next Message Responder in the Responder suite (if more Message Responders are present; otherwise an error response message is returned).
    • Additional fields to match can be added to the list:



Matching Based on the Presence (or Absence) of a Field ID

You can configure the responder to use the presence (or absence) of a field ID in the incoming ISO 8583 request message as a correlation criterion.

  • If you want the responder to respond to a message if the specified field ID is present, set the value to Occurrence, then select Present.
  • If you want the responder to respond to a message if the specified field ID is NOT present, set the value to Occurrence, then select Absent.

For example, a responder with the following configuration would respond if the incoming ISO 8583 request message does NOT contain the field ID of 7.

Using ISO 8583 Data Source Correlation

For general details on data source correlation in Message Responders, see Data Source Correlation Tab.

Field IDs (provided for the incoming messages) can be matched with one or more data source column name (similar to how XPaths, URL parameters, etc. are handled). Form ISO 8583 fields can then be parameterized with various data source columns.

Note that Form ISO 8583 fields support the Use Data Source: Exclude with empty string feature. This allows you to generate the ISO 8583 messages with dynamic fields and have them included/excluded based on the data in the corresponding data source row. See Using Data Sources with Form XML: Excluding Elements and Attributes for details on this capability.

  • No labels