微信支付 加 微信支付回调
/**
* 微信支付的统一下单接口
**/
@ResponseBody
@RequestMapping(value = "/gobuy", method = RequestMethod.POST)
public void addOrder(@RequestBody Map<String, Object> map, HttpServletRequest request, HttpServletResponse response) throws Exception {
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
SortedMap<Object, Object> packageParams = new TreeMap<Object, Object>();
packageParams.put("appid", APPID); // 微信小程序ID
packageParams.put("mch_id", mchId); // 商户ID
packageParams.put("nonce_str", WXPayUtil.generateNonceStr()); // 随机字符串(32位以内) 这里使用时间戳
packageParams.put("body", title); // 支付主体名称 自定义 商品描述
packageParams.put("out_trade_no", orderNum); //订单号
packageParams.put("total_fee", fee); // 订单金额
packageParams.put("spbill_create_ip", spbilCreateIp);//终端IP 回调服务器地址
packageParams.put("notify_url