首信易支付,電話費儲值介面

來源:互聯網
上載者:User
首信易支付,話費儲值介面
採用資料加密的形式: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 這個不是介面檔案嗎?
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.