All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.global.api.gateways.XmlGateway Maven / Gradle / Ivy

There is a newer version: 14.2.3
Show newest version
package com.global.api.gateways;

import com.global.api.entities.exceptions.GatewayException;

public abstract class XmlGateway extends Gateway {
    public XmlGateway() {
        super("text/xml");
    }

    public String doTransaction(String request) throws GatewayException {
        GatewayResponse response = sendRequest("POST", "", request);
        if(response.getStatusCode() != 200)
            throw new GatewayException("Unexpected http status code [" + response.getStatusCode() + "]");
        return response.getRawResponse();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy