扣款接口实现
/**
* @param :out_trade_no-订单号;total_fee-订单总金额;contract_id-签约成功后,微信返回的委托代扣协议id
* @Author : lilong
* @Description :微信支付扣款
* @Date : 11:16 2018/5/4
**/
public void wxDeductMoney(String out_trade_no, Integer total_fee, String contract_id) throws Exception {
//扣款请求的参数集合
Map<String, String> map = new HashMap<>();
//签名所需要的参数
//生成随机数
String nonce_str = getNonce();
String body = "HH";
String detail = "HH";
String attach = "666";
String fee_type = "CNY";
String spbill_create_ip = "192.168.1.1";
String goods_tag = "WXG";
String notify_url = "http://www.sz.cn/mvc/wechat/callbackDeductMoney";//回调
//交易类型---微信委托代扣支付
String trade_type = "PAP";
map.put("appid", appid);
map.put("mch_id", mch_id);
map.put("nonce_str", nonce_str);
map.put("body", body);
map.put("detail", detail);
map.put("attach", attach);
map.put("out_trade_no", out_trade_no);
map.put("total_fee", total_fee.toString());
map.put("fee_type", fee_type);
map.put("spbill_create_ip", spbill_create_ip);
map.put("goods_tag", goods_tag);
map.put("notify_url", notify_url);
map.put("trade_type", trade_type);
map.put(