2、mport java.net.HttpURLConnection;import java.net.URL;import java.net.URLEncoder;import java.util.HashMap;import java.util.Map; import net.sf.json.JSONObject; /***加油卡充值调用示例代码 - 聚合数据*在线接口文档:http://www.juhe.cn/docs/87**/ public class JuheDemo { public
3、static final String DEF_CHATSET = "UTF-8"; public static final int DEF_CONN_TIMEOUT = 30000; public static final int DEF_READ_TIMEOUT = 30000; public static String userAgent = "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Geck
4、o) Chrome/29.0.1547.66 Safari/537.36"; //配置您申请的KEY public static final String APPKEY ="*************************"; //1.订单状态查询 public static void getRequest1(){ String result =null; String url ="http://op.juhe.cn/ofpay/sinope
5、c/ordersta";//请求接口地址 Map params = new HashMap();//请求参数 params.put("orderid","");//商家订单号,8-32位字母数字组合 params.put("key",APPKEY);//应用APPKEY(应用详细页查询) try { result =net(url, params, "GET"); JSONObjec