Project: Bit4Tat
     /**
     * PaymentService.java - An abstract base class for each exchange's  
     * payment services. 
     * Copyright (C) 2011 Josh Dorothy, Ben Harrington, Max Thayer  
     *  
     * This program is free software: you can redistribute it and/or modify 
     * it under the terms of the GNU Affero General Public License as 
     * published by the Free Software Foundation, either version 3 of the 
     * License, or (at your option) any later version. 
     *  
     * This program is distributed in the hope that it will be useful, 
     * but WITHOUT ANY WARRANTY; without even the implied warranty of 
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     * GNU Affero General Public License for more details. 
     *  
     * You should have received a copy of the GNU Affero General Public License 
     * along with this program.  If not, see <http://www.gnu.org/licenses/>. 
     */
 
package com.Bit4Tat; 
 
import java.io.BufferedReader; 
import java.io.DataOutputStream; 
import java.io.IOException; 
import java.io.InputStreamReader; 
import java.net.MalformedURLException; 
import java.net.URL; 
import java.security.KeyManagementException; 
import java.security.NoSuchAlgorithmException; 
import java.security.SecureRandom; 
import java.security.cert.CertificateException; 
import java.security.cert.X509Certificate; 
 
import javax.net.ssl.HostnameVerifier; 
import javax.net.ssl.HttpsURLConnection; 
import javax.net.ssl.KeyManager; 
import javax.net.ssl.SSLContext; 
import javax.net.ssl.SSLSession; 
import javax.net.ssl.TrustManager; 
import javax.net.ssl.X509TrustManager; 
 
public abstract class PaymentService  
 protected static String user; 
 protected static String pass; 
 protected static String service; 
 /**
  * Buys the amount of currency for the price given 
  * @param amount -  
  * @param price -  
  * @return void 
  */
 
 public abstract void buy (double amount, double price); 
 /**
  * Sells the amount of currency for the price given 
  * @param amount - 
  * @param price - 
  * @return 
  */
 
 public abstract void sell (double amount, double price); 
 /**
  * Buys the amount of currency for the price given 
  * @return Response container child matching the service used. 
  */
 
 public abstract ResponseContainer checkBalance (); 
 /**
  * Buys the amount of currency for the price given 
  * @return Response container child matching the service used. 
  */
 
 public abstract ResponseContainer checkTicker (); 
 /**
  * Gets the Orders completed 
  * @return void 
  *   */
 
 public abstract void getOrders (); 
 /**
  * Cancel Order 
  * @param OrderID number 
  * @return void 
  */
 
 public abstract void cancelOrder (int orderID); 
  
 public String getService()  
 
  return service; 
 
  
 public String getUser() 
 
  return user; 
 
}