package org.jpos.tcpay.acquirer;

import org.jpos.iso.ISOMsg;
import org.jpos.tcpay.model.IsoAcquirerTerminal;

import java.util.Map;

public interface JposAcquirerTranslator {

    /**
     * Jpos Message to Acquirer Message
     * @param isoMsg Usually Message received by Jpos
     * @return Message to be transmitted to Acquirer
     */
    ISOMsg toMessage(ISOMsg isoMsg, IsoAcquirerTerminal isoAcquirerTerminal, Map<String, Object> metadata);

    /**
     * Acquirer Message to Jpos Message
     * @param isoMsg Usually Message received by Acquirer
     * @return  Message to be transmitted to Jpos consumer
     */
    ISOMsg fromMessage(ISOMsg isoMsg, ISOMsg jposRequest, Map<String, Object> metadata);

}
