|
|
|
@@ -84,7 +84,7 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { |
|
|
|
"\"XML_FORMAT_ERROR\":{\"detail\":\"XML格式错误\t\",\"reason\":\"XML格式错误\",\"reason\":\"请检查XML参数格式是否正确\"}}"); |
|
|
|
|
|
|
|
@Override |
|
|
|
public ResultData createPayOrder(boolean isReal, WxAppinfo appInfo, WxCUser user, WxPayOrder record, EnumPayWay payWay) { |
|
|
|
public ResultData createPayOrder(boolean isReal, boolean isShare, WxAppinfo appInfo, WxCUser user, WxPayOrder record, EnumPayWay payWay) { |
|
|
|
final IdWorker idworker = IdWorker.get(); |
|
|
|
|
|
|
|
try { |
|
|
|
@@ -152,7 +152,10 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { |
|
|
|
Date futureDate = new Date(); |
|
|
|
futureDate.setTime(currentDate.getTime() + 15*60*1000); |
|
|
|
wxPayOrderP.setTime_expire(Utility.getDataFormatStringYYYYMMDDHHmmss(futureDate)); // 15分钟后结束 |
|
|
|
wxPayOrderP.setSign(WxPayment.createSign(BeanUtils.toStringMap(wxPayOrderP), payAccount.getApiKey())); |
|
|
|
Map<String, String> payOrderMap = BeanUtils.toStringMap(wxPayOrderP); |
|
|
|
if(isShare) |
|
|
|
payOrderMap.put("profit_sharing", "Y"); |
|
|
|
wxPayOrderP.setSign(WxPayment.createSign(payOrderMap, payAccount.getApiKey())); |
|
|
|
String response = WxPay.pushOrder(BeanUtils.toStringMap(wxPayOrderP)); |
|
|
|
logger.info("pay order, wechat pushOrder, " + wxPayOrderP.toString() + ", response: " + response.toString()); |
|
|
|
Map<String, String> returnMap = WxPayment.xmlToMap(response); |
|
|
|
|