package cn.newfeifan.mall.module.pay.fuiou.client;

import cn.newfeifan.mall.module.pay.fuiou.util.FuiouHttpPoster;
import cn.newfeifan.mall.module.pay.fuiou.util.MD5;
import com.alibaba.fastjson.JSON;
import cn.newfeifan.mall.module.pay.fuiou.reqdata.QueryWithdrawAmtDataReq;

/**
 * 类功能描述
 * QueryWithdrawAmtClient.java
 * 2.7 查询可提现资金
 * 
 * @author user
 * @version 0.1.0
 */
public class QueryWithdrawAmtClient {

	public static String privateKey = "4e092f20607e11e71d2214ad47a356fa";
	
	public static void main(String[] args) throws Exception {
		FuiouHttpPoster http = new FuiouHttpPoster();
		http.setCharset("utf-8");
		http.setUrl("http://192.168.8.45:45002/aggregatePay/queryWithdrawAmt");
		QueryWithdrawAmtDataReq req = new QueryWithdrawAmtDataReq();
		req.setMchnt_cd("0002900F0370586");
		req.setRandom_str("123456");
		req.setSign(MD5.MD5Encode(req.getMchnt_cd() + "|" + req.getRandom_str() + "|" + privateKey, "UTF-8"));
		String res = http.newPost(JSON.toJSONString(req));
		System.out.println(res);
	}
}
