| | |
| | | if (StringUtil.isNullOrEmpty(params.getTradeType()))
|
| | | throw new WXPlaceOrderParamsException(8, "请传入tradeType");
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(params.getOpenId()))
|
| | | throw new WXPlaceOrderParamsException(9, "请传入openId");
|
| | | // if (StringUtil.isNullOrEmpty(params.getOpenId()))
|
| | | // throw new WXPlaceOrderParamsException(9, "请传入openId");
|
| | |
|
| | | Map<String, String> map = new HashMap<String, String>();
|
| | | map.put("appid", params.getInfo().getAppId());
|
| | |
| | | map.put("spbill_create_ip", params.getIp());
|
| | | map.put("notify_url", params.getNotifyUrl());
|
| | | map.put("trade_type", params.getTradeType());
|
| | | map.put("openid", params.getOpenId());
|
| | | if (!StringUtil.isNullOrEmpty(params.getOpenId()))
|
| | | map.put("openid", params.getOpenId());
|
| | | map.put("sign", WXUtil.getSignMD5(map, params.getInfo().getMchKey()));
|
| | |
|
| | | String entity = WXUtil.loadWXMessage(map);
|