static String format = "xml"; static String userid = "demo@gfax.cn"; static String pass = "mypassword"; static String deskey = "mydeskey"; //查询资金日志 public static void queryLog() { AllcomUtil allcom = new AllcomUtil(userid,pass,AllcomUtil.MD5); String url = "http://api.gfax.cn:8088/querymoneylog/" + format; String result = allcom.getHttp(url); System.out.println(result); }
require("allcomutil.php"); $userid = "jun@gfax.cn"; $pass = "mxjunolkd"; $allcom = new allcom($userid,$pass); $result = $allcom->getHttp("http://api.gfax.cn:8088/querymoneylog/xml"); echo $result;
string userid = "jun@gfax.cn"; string pass = "mxjunolkd"; string deskey = "ttttaaaa"; AllcomUtil allcom = new AllcomUtil(userid,pass,2,deskey); string result = allcom.getHttp("http://api.gfax.cn:8088/querymoneylog/xml"); Console.WriteLine(result);
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <gfaxroot> <result>0</result> <description>查询成功</description> <payitem> <serial>201112270147960544</serial> <amount>10.0</amount> <optime>2011-12-27 17:24:13.78</optime> <optype>1</optype> <commen>测试</commen> </payitem> <payitem> <serial>201108120117825348</serial> <amount>20.0</amount> <optime>2011-08-12 11:59:42.92</optime> <optype>1</optype> <commen></commen> </payitem> <payitem> <serial>200709110003769605</serial> <amount>20.0</amount> <optime>2007-09-11 11:26:58.107</optime> <optype>1</optype> <commen></commen> </payitem> <payitem> <serial>200607070000211202</serial> <amount>20.0</amount> <optime>2006-07-07 10:06:08.433</optime> <optype>1</optype> <commen>开户充值2</commen> </payitem> </gfaxroot>服务器返回示例2
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <gfaxroot> <result>-3</result> <description>身份认证失败</description> </gfaxroot>