First letter easy to pay, phone recharge interface
Take the form of data encryption: Md5+des
Package com.test.moltest;
Import Net.sf.json.JSONObject;
Import Com.huonet.util.DESTools;
Import Com.huonet.util.UserJsonUtil;
public class Mobilerecharg {
public static void Main (string[] argv) throws Exception {
Call the Recharge interface
String Application_value = "recharge";
String account = "Payease";
String mobile = "13581570818";
String OrderID = "201305133127";
String amount = "100";
Jsonobject jobj = new Jsonobject ();
Jobj.accumulate ("Application_value", Application_value);
Jobj.accumulate ("account", account);
Jobj.accumulate ("mobile", mobile);
Jobj.accumulate ("Amount", amount);
Jobj.accumulate ("OrderID", OrderID);
String s = Java.net.URLEncoder.encode (Userjsonutil.encryptjsonuser (jobj));
String res= "http://www1.beijing.com.cn/user/api/mobile_test.jsp?s=" +s;
System.out.println ("res==" +res);
Call End
Handling returned results
res = "clp5zjwtq9waj0q6qnj6tarnhqmowujv/frlhdmk4ufxexx0beeh+pbi9guwdjtju/ xchsqrifjlezvqgw8efb4jxzoosnxtstg00gxvzrovinl6o30hua== ";
System.out.println (Userjsonutil.decryptjsonuser1 (Res.trim ()));
s = Destools.decrypt ("Testtest", s);//decryption 1
Jobj = Jsonobject.fromobject (s);
System.out.println (Jobj);
}
}
How can this interface be called by PHP?
------Solution--------------------
What is this, easy letter?
------Solution--------------------
After what Ah, recently also in the preparation, but there is no idea ah ... Tell me about your solution ... It's a matter of course.
------Solution--------------------
Access points
------Solution--------------------
Landlord to share the code under ... I have to do it in a while.
------Solution--------------------
Landlord code sharing under
------Solution--------------------
Http://www1.beijing.com.cn/user/api/mobile_test.jsp is this not an interface file?