日期:2014-05-16  浏览次数:20556 次

首信易支付,话费充值接口
采用数据加密的形式: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 这个不是接口文件么?