Home >Backend Development >PHP Tutorial > 首信易支付,话费充值接口解决方法

首信易支付,话费充值接口解决方法

WBOY
WBOYOriginal
2016-06-13 12:29:461217browse

首信易支付,话费充值接口
采用数据加密的形式:md5+des

<br />
package com.test.moltest;<br />
<br />
import net.sf.json.JSONObject;<br />
<br />
import com.huonet.util.DESTools;<br />
import com.huonet.util.UserJsonUtil;<br />
<br />
public class MobileRecharg { <br />
	public static void main(String[] argv) throws Exception { <br />
		//调用充值接口<br />
		String application_value = "recharge";<br />
		String account = "payease";<br />
		String mobile = "13581570818";<br />
		String orderid = "201305133127";<br />
		String amount = "100";<br />
		 JSONObject jobj = new JSONObject();<br />
		 jobj.accumulate("application_value", application_value);<br />
		 jobj.accumulate("account", account);<br />
		 jobj.accumulate("mobile", mobile);<br />
		 jobj.accumulate("amount", amount);<br />
		 jobj.accumulate("orderid", orderid);<br />
		 String s = java.net.URLEncoder.encode(UserJsonUtil.encryptJsonUser(jobj));<br />
		 String res=  "http://www1.beijing.com.cn/user/api/mobile_test.jsp?s="+s;<br />
		System.out.println( "res=="+res);<br />
		//调用结束<br />
 			<br />
		//处理返回结果<br />
 			<br />
		//res = "CLp5Zjwtq9waj0Q6QNj6TArNHqMOwuJV/FRlHdmk4UFxExX0bEeH+pbi9guWDjTju/XchsQrIfJleZvQGw8Efb4JxzOosnXTstG00gxVzROVinl6o30HUA==";<br />
 			System.out.println(UserJsonUtil.decryptJsonUser1(res.trim()));<br />
 			s = DESTools.decrypt("testtest", s);//解密1<br />
            jobj = JSONObject.fromObject(s);<br />
            System.out.println(jobj);<br />
            <br />
	}<br />
<br />
}<br />



这个接口要PHP如何调用? 楼主代码分享下这是啥呀,易信?http://www1.beijing.com.cn/user/api/mobile_test.jsp 这个不是接口文件么? 接了 干什么啊 ,最近也在弄 ,还在准备中,但是没什么思路啊。。。说说你的解决办法啊...具体是个怎么过程楼主把代码共享下...我过段时间也要弄...接分 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn