A computer program embodied on a computer-readable medium, the computer program being configured to facilitate communications between a server and one or more payment gateways, comprising:
- (a) a code segment for receiving a message by the server;
- (b) a code segment for parsing the message into one or more data elements;
- (c) a code segment for determining a type of payment transaction based on the one or more data elements;
- (d) a code segment for selecting a payment message format and a communication protocol based on the type of payment transaction;
- (e) a code segment for formatting a payment message using the selected payment message format;
- (f) a code segment for establishing a communication link between the server and the one or more payment gateways;
- and
- (g) a code segment for transmitting the payment message to the one or more payment gateways using the selected communication protocol.