com.global.api.gateways.XmlGateway Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of globalpayments-sdk Show documentation
Show all versions of globalpayments-sdk Show documentation
API for processing payments through Global Payments
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();
}
}