首信易支付,話費儲值介面
採用資料加密的形式: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 {
//調用儲值介面
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);
//調用結束
//處理返回結果
//res = "CLp5Zjwtq9waj0Q6QNj6TArNHqMOwuJV/FRlHdmk4UFxExX0bEeH+pbi9guWDjTju/XchsQrIfJleZvQGw8Efb4JxzOosnXTstG00gxVzROVinl6o30HUA==";
System.out.println(UserJsonUtil.decryptJsonUser1(res.trim()));
s = DESTools.decrypt("testtest", s);//解密1
jobj = JSONObject.fromObject(s);
System.out.println(jobj);
}
}
這個介面要PHP如何調用?
分享到:
------解決方案--------------------
這是啥呀,易信?
------解決方案--------------------
接了 幹什麼啊 ,最近也在弄 ,還在準備中,但是沒什麼思路啊。。。說說你的解決方案啊...具體是個怎麼過程
------解決方案--------------------
接分
------解決方案--------------------
樓主把代碼共用下...我過段時間也要弄...
------解決方案--------------------
樓主代碼分享下
------解決方案--------------------
http://www1.beijing.com.cn/user/api/mobile_test.jsp 這個不是介面檔案嗎?