Class GatewayConnector


public class GatewayConnector extends Object
Handles connections to the eWay servers. Based on public domain sample code provided by
  • Constructor Details

    • GatewayConnector

      public GatewayConnector(int timeout)
    • GatewayConnector

      public GatewayConnector()
  • Method Details

    • getTimeout

      public int getTimeout()
      Get the timeout value set in the corresponding setter.
      timeout value in seconds, 0 for infinite
    • setTimeout

      public void setTimeout(int time)
      Set the timout value. Note that setting the timeout for an HttpURLConnection is possible only since Java 1.5. This method has no effect on earlier versions.
      time - timeout value in seconds, 0 for infinite
    • sendRequest

      public GatewayResponse sendRequest(GatewayRequest request) throws Exception
      Send a request to the payment gateway and get the response. This is a blocking method: when it returns the response object is filled in with the parameters from the gateway.
      request - the request object, can be any of the 3 supported payment methods. Its data have to be filled in by its setter methods before calling sendRequest().
      the response object, containing the gateway's response to the request
      Exception - in case of networking and xml parsing errors