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.QueryFeeAmtDataReq;

/**
 * 类功能描述
 * QueryFeeAmtClient.java
 * 2.8 查询提现手续费
 * 
 * @author user
 * @version 0.1.0
 */
public class QueryFeeAmtClient {

	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/queryFeeAmt");
		QueryFeeAmtDataReq req = new QueryFeeAmtDataReq();
		req.setMchnt_cd("0002900F0370586");
		req.setRandom_str("123456");
		req.setAmt("200000");
		req.setSign(MD5.MD5Encode(req.getMchnt_cd() + "|" + req.getAmt() + "|" + req.getRandom_str() + "|" + privateKey, "UTF-8"));
		String res = http.newPost(JSON.toJSONString(req));
		System.out.println(res);
	}
}
