|
|
|
@ -56,24 +56,30 @@ public class RechargeConfig { |
|
|
|
|
* @Param [com.alibaba.fastjson.JSONObject] |
|
|
|
|
* @return com.alibaba.fastjson.JSONObject |
|
|
|
|
*/ |
|
|
|
|
public static JSONObject rechargeOrderByLy(JSONObject object) throws Exception { |
|
|
|
|
public static JSONObject rechargeOrderByLy(JSONObject object) { |
|
|
|
|
|
|
|
|
|
Map<String,Object> paramMap = new HashMap<>(); |
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
paramMap.put("out_trade_num" , object.getString("out_trade_num")); |
|
|
|
|
paramMap.put("product_id" , object.getString("product_id")); |
|
|
|
|
paramMap.put("mobile" , object.getString("mobile")); |
|
|
|
|
paramMap.put("notify_url" , object.getString("notifyUrl")); |
|
|
|
|
paramMap.put("userid" , CommonSysConst.getSysConfig().getLyMemberId()); |
|
|
|
|
paramMap.put("sign", WxUtils.generateSignatureLy(paramMap , CommonSysConst.getSysConfig().getLyApiKey() , WXPayConstants.SignType.MD5)); |
|
|
|
|
Map<String,Object> paramMap = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
log.info("发起龙阅订单充值="); |
|
|
|
|
log.info("龙阅订单充值-请求参数: " + JSON.toJSONString(paramMap)); |
|
|
|
|
paramMap.put("out_trade_num" , object.getString("out_trade_num")); |
|
|
|
|
paramMap.put("product_id" , object.getString("product_id")); |
|
|
|
|
paramMap.put("mobile" , object.getString("mobile")); |
|
|
|
|
paramMap.put("notify_url" , object.getString("notifyUrl")); |
|
|
|
|
paramMap.put("userid" , CommonSysConst.getSysConfig().getLyMemberId()); |
|
|
|
|
paramMap.put("sign", WxUtils.generateSignatureLy(paramMap , CommonSysConst.getSysConfig().getLyApiKey() , WXPayConstants.SignType.MD5)); |
|
|
|
|
|
|
|
|
|
JSONObject jsonObject = HttpsUtils.doPost(CommonSysConst.getSysConfig().getLyPostUrl()+ "index/recharge", paramMap); |
|
|
|
|
log.info("发起龙阅订单充值="); |
|
|
|
|
log.info("龙阅订单充值-请求参数: " + JSON.toJSONString(paramMap)); |
|
|
|
|
|
|
|
|
|
log.info("龙阅订单充值-响应参数: " + jsonObject.toJSONString()); |
|
|
|
|
return jsonObject; |
|
|
|
|
JSONObject jsonObject = HttpsUtils.doPost(CommonSysConst.getSysConfig().getLyPostUrl()+ "index/recharge", paramMap); |
|
|
|
|
|
|
|
|
|
log.info("龙阅订单充值-响应参数: " + jsonObject.toJSONString()); |
|
|
|
|
return jsonObject; |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -112,27 +118,33 @@ public class RechargeConfig { |
|
|
|
|
* @Param [com.alibaba.fastjson.JSONObject] |
|
|
|
|
* @return com.alibaba.fastjson.JSONObject |
|
|
|
|
*/ |
|
|
|
|
public static JSONObject rechargeOrderByJj(JSONObject object) throws Exception { |
|
|
|
|
|
|
|
|
|
String timestamp = String.valueOf(System.currentTimeMillis()); |
|
|
|
|
|
|
|
|
|
Map<String , Object> map = new HashMap<>(); |
|
|
|
|
map.put("mobile" , object.getString("mobile")); |
|
|
|
|
map.put("amount" , object.getString("amount")); |
|
|
|
|
map.put("out_order_id" , object.getString("out_order_id")); |
|
|
|
|
map.put("app_key" , CommonSysConst.getSysConfig().getJjAppKey()); |
|
|
|
|
map.put("timestamp" , timestamp.substring(0,timestamp.length()-3)); |
|
|
|
|
map.put("notify_url" , object.getString("notifyUrl")); |
|
|
|
|
String signStr = WxUtils.generateSignatureAppSecret(map, CommonSysConst.getSysConfig().getJjAppSecret() , WXPayConstants.SignType.MD5); |
|
|
|
|
map.put("sign" , signStr); |
|
|
|
|
|
|
|
|
|
log.info("发起尖椒充值"); |
|
|
|
|
log.info("尖椒订单充值-请求参数: " + JSON.toJSONString(map)); |
|
|
|
|
public static JSONObject rechargeOrderByJj(JSONObject object) { |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
String timestamp = String.valueOf(System.currentTimeMillis()); |
|
|
|
|
|
|
|
|
|
Map<String , Object> map = new HashMap<>(); |
|
|
|
|
map.put("mobile" , object.getString("mobile")); |
|
|
|
|
map.put("amount" , object.getString("amount")); |
|
|
|
|
map.put("out_order_id" , object.getString("out_order_id")); |
|
|
|
|
map.put("app_key" , CommonSysConst.getSysConfig().getJjAppKey()); |
|
|
|
|
map.put("timestamp" , timestamp.substring(0,timestamp.length()-3)); |
|
|
|
|
map.put("notify_url" , object.getString("notifyUrl")); |
|
|
|
|
String signStr = WxUtils.generateSignatureAppSecret(map, CommonSysConst.getSysConfig().getJjAppSecret() , WXPayConstants.SignType.MD5); |
|
|
|
|
map.put("sign" , signStr); |
|
|
|
|
|
|
|
|
|
log.info("发起尖椒充值"); |
|
|
|
|
log.info("尖椒订单充值-请求参数: " + JSON.toJSONString(map)); |
|
|
|
|
|
|
|
|
|
JSONObject jsonObject = HttpsUtils.doPost(CommonSysConst.getSysConfig().getJjUrl() + "createOrder" , map); |
|
|
|
|
|
|
|
|
|
log.info("尖椒订单充值-响应参数: " + jsonObject.toJSONString()); |
|
|
|
|
return jsonObject; |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
JSONObject jsonObject = HttpsUtils.doPost(CommonSysConst.getSysConfig().getJjUrl() + "createOrder" , map); |
|
|
|
|
|
|
|
|
|
log.info("尖椒订单充值-响应参数: " + jsonObject.toJSONString()); |
|
|
|
|
return jsonObject; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -175,25 +187,30 @@ public class RechargeConfig { |
|
|
|
|
* @Param [object] |
|
|
|
|
* @Return com.alibaba.fastjson.JSONObject |
|
|
|
|
*/ |
|
|
|
|
public static JSONObject rechargeOrderByHg(JSONObject object) throws Exception { |
|
|
|
|
Map<String,Object> paramMap = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
paramMap.put("mchid" , CommonSysConst.getSysConfig().getHgMemberId()); |
|
|
|
|
paramMap.put("phone" , object.getString("phone")); |
|
|
|
|
paramMap.put("orderid" , object.getString("orderid")); |
|
|
|
|
paramMap.put("price" , object.getInteger("price").toString()); |
|
|
|
|
paramMap.put("product_id" , object.getString("product_id")); |
|
|
|
|
paramMap.put("notify" , CommonSysConst.getSysConfig().getHgNotifyUrl()); |
|
|
|
|
paramMap.put("sign", WxUtils.generateSignatureHg(paramMap , CommonSysConst.getSysConfig().getHgApiKey() , WXPayConstants.SignType.MD5)); |
|
|
|
|
|
|
|
|
|
log.info("发起畅停话费查询订单="); |
|
|
|
|
log.info("畅停话费查询订单-请求参数: " + JSON.toJSONString(paramMap)); |
|
|
|
|
|
|
|
|
|
System.out.println("畅停话费查询订单-请求参数: " + JSON.toJSONString(paramMap)); |
|
|
|
|
JSONObject repsObject = HttpsUtils.doPostForm(CommonSysConst.getSysConfig().getHgPostUrl()+ "external/api/telPay", paramSort(paramMap), new HashMap<>()); |
|
|
|
|
public static JSONObject rechargeOrderByHg(JSONObject object) { |
|
|
|
|
try { |
|
|
|
|
Map<String,Object> paramMap = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
paramMap.put("mchid" , CommonSysConst.getSysConfig().getHgMemberId()); |
|
|
|
|
paramMap.put("phone" , object.getString("phone")); |
|
|
|
|
paramMap.put("orderid" , object.getString("orderid")); |
|
|
|
|
paramMap.put("price" , object.getInteger("price").toString()); |
|
|
|
|
paramMap.put("product_id" , object.getString("product_id")); |
|
|
|
|
paramMap.put("notify" , CommonSysConst.getSysConfig().getHgNotifyUrl()); |
|
|
|
|
paramMap.put("sign", WxUtils.generateSignatureHg(paramMap , CommonSysConst.getSysConfig().getHgApiKey() , WXPayConstants.SignType.MD5)); |
|
|
|
|
|
|
|
|
|
log.info("发起畅停话费查询订单="); |
|
|
|
|
log.info("畅停话费查询订单-请求参数: " + JSON.toJSONString(paramMap)); |
|
|
|
|
|
|
|
|
|
System.out.println("畅停话费查询订单-请求参数: " + JSON.toJSONString(paramMap)); |
|
|
|
|
JSONObject repsObject = HttpsUtils.doPostForm(CommonSysConst.getSysConfig().getHgPostUrl()+ "external/api/telPay", paramSort(paramMap), new HashMap<>()); |
|
|
|
|
|
|
|
|
|
log.info("畅停话费查询订单-响应参数: " + repsObject.toJSONString()); |
|
|
|
|
return repsObject; |
|
|
|
|
}catch (Exception e) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
log.info("畅停话费查询订单-响应参数: " + repsObject.toJSONString()); |
|
|
|
|
return repsObject; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|