First letter easy to pay, phone recharge interface Solution

Source: Internet
Author: User
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?
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    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.