//将以key=value&key=value。。。的字符串转换为map集合中
Map<String, String> map = new HashMap<String, String>();
String[] arr = ReturnWeiXinUrl.split("&");
for (String str : arr) {
String[] params = str.split("=");
if(params.length>1){
String key = params[0];
String value = URLDecoder.decode(params[1], "UTF-8");
//String value = params[1];
//System.out.println(" key "+ key + " == " + value);
map.put(key, value);
}
}
//获取 responseCode
responseCode = map.get("responseCode") ;
System.out.println("WeiXinWapPayOperation----->responseCode:::" + responseCode);
Map<String, String> map = new HashMap<String, String>();
String[] arr = ReturnWeiXinUrl.split("&");
for (String str : arr) {
String[] params = str.split("=");
if(params.length>1){
String key = params[0];
String value = URLDecoder.decode(params[1], "UTF-8");
//String value = params[1];
//System.out.println(" key "+ key + " == " + value);
map.put(key, value);
}
}
//获取 responseCode
responseCode = map.get("responseCode") ;
System.out.println("WeiXinWapPayOperation----->responseCode:::" + responseCode);