|
|
@ -41,6 +41,27 @@ public class QianZhuConfig { |
|
|
|
return HttpsUtils.doGet(CommonSysConst.getSysConfig().getQinzhuUrl()+"/api/v2/platform/getToken", map); |
|
|
|
return HttpsUtils.doGet(CommonSysConst.getSysConfig().getQinzhuUrl()+"/api/v2/platform/getToken", map); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static JSONObject getByOrderNo(String orderNo) throws Exception { |
|
|
|
|
|
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
|
|
|
|
|
map.put("platformId", CommonSysConst.getSysConfig().getQinzhuPlatformId()); |
|
|
|
|
|
|
|
map.put("timestamp", new Date().getTime()); |
|
|
|
|
|
|
|
map.put("orderNo", orderNo); |
|
|
|
|
|
|
|
map.put("sign", MD5Util.encode(generateSignature(map,CommonSysConst.getSysConfig().getQinzhuSecret()).getBytes()).toLowerCase()); |
|
|
|
|
|
|
|
return HttpsUtils.doPost(CommonSysConst.getSysConfig().getQinzhuUrl()+"/openApi/v1/kfcOrders/getByOrderNo", JSONObject.toJSONString(map)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static JSONObject payKfcOrder(String orderNo) throws Exception { |
|
|
|
|
|
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
|
|
|
|
|
map.put("platformId", CommonSysConst.getSysConfig().getQinzhuPlatformId()); |
|
|
|
|
|
|
|
map.put("timestamp", new Date().getTime()); |
|
|
|
|
|
|
|
map.put("notifyUrl", ""); |
|
|
|
|
|
|
|
map.put("orderNo", orderNo); |
|
|
|
|
|
|
|
map.put("sign", MD5Util.encode(generateSignature(map,CommonSysConst.getSysConfig().getQinzhuSecret()).getBytes()).toLowerCase()); |
|
|
|
|
|
|
|
return HttpsUtils.doPost(CommonSysConst.getSysConfig().getQinzhuUrl()+"/openApi/v1/orders/payKfcOrder", JSONObject.toJSONString(map)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 生成签名 |
|
|
|
* 生成签名 |
|
|
|
* @param data 数据 |
|
|
|
* @param data 数据 |
|
|
|