try {
url = new URL("https://"+HOST+":"+PORT);
HttpsURLConnection connection = (HttpsURLConnection)url.openConnection();
connection.setHostnameVerifier(new NullHostNameVerifier());
connection.setDoOutput(true);
connection.setUseCaches(false);
connection.setAllowUserInteraction(false);
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
StringBuilder xml = createOrder(payinfo);
String a = xml.toString();
DataOutputStream out = new DataOutputStream(connection.getOutputStream());
out.write(xml.toString().getBytes());
out.flush();
// process and read the gateway response
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
sReturned = in.readLine();
} catch (IOException exIoe) {
payinfo.paymentError(LocalRes.getIntString("exception.iofile"), exIoe.getMessage());