Using the Merchant/400 API in an OPM Program


Introduction

The Merchant/400 API interface provided for the OPM (Original Programming Model) environment is through the program WWWMRCSB in the WWWSERVER library. Constants that define API entry points for OPM RPG applications are available in member WWWMAPI in WWWSERVER/QRPGSRC. Data items that define API entry points for COBOL applications can be found in member WWWMAPI in WWWSERVER/QCBLSRC.


The OPM Program to Call to Execute the API

The following documents the program that is available to execute the Merchant/400 API in an OPM environment. The API requires all of the parameters that are listed. More information about the minimum information needed by the API can be found in the topic on Required Information. The library WWWSERVER must be in your library list before calling the API.


WWWMRCSB

Parameters:
   1.  Remote Host Name            Input        Char(*)

   2.  Remote Host Name Length     Input        Binary(4)

   3.  Remote Port Number          Input        Binary(4)

   4.  Transmission Method         Input        Binary(4)

   5.  Input Data Format           Input        Binary(4)

   6.  Input Data Buffer           Input        Char(*)

   7.  Output Data Format          Input        Binary(4)

   8.  Output Data Buffer          Input/Output Char(*)

   9.  Completion Indicator        Output       Binary(4)
where,

Remote Host Name is the buffer containing the name and domain, or IP address, of the remote processing host. This will be supplied by the partner agency.

Remote Host Name Length is the length of the Remote Host Name buffer. This will be calculated by your application based on the size of the entry in the Remote Host Name parameter.

Remote Port Number is the socket port number used by the remote host for SSL communications. This will usually be set to 443.

Transmission Method tells the Merchant/400 API how to transmit the data. Please refer to the topic What Happens - Transmission Methods for more information on how to set this parameter.

Input Data Format tells the API what format your input data will be in.

Input Data Buffer is the formatted buffer that holds the customer, order, and credit card information.

Output Data Format tells the API what format you are expecting to receive results data to be in.

Output Data Buffer is the formatted buffer that will hold the returned transaction information from the card processor.

Completion Indicator is the code returned indicating the success of the transaction.

Please refer to the document What Happens - Transmission Methods for a description of the processing that is performed within the API.