|
@@ -70,6 +70,7 @@ public class ApiPayController extends ApiBaseAction {
|
|
for(int i=0;i<orderIds.length;i++){
|
|
for(int i=0;i<orderIds.length;i++){
|
|
orderIdList.add(orderIds[i]);
|
|
orderIdList.add(orderIds[i]);
|
|
}
|
|
}
|
|
|
|
+ BigDecimal actual_price = new BigDecimal(0);
|
|
List<OrderVo> orderVoList = orderService.queryObjectByIdList(orderIdList);
|
|
List<OrderVo> orderVoList = orderService.queryObjectByIdList(orderIdList);
|
|
List<OrderProcessRecordEntity> processRecordEntityList = new ArrayList<>();
|
|
List<OrderProcessRecordEntity> processRecordEntityList = new ArrayList<>();
|
|
|
|
|
|
@@ -91,6 +92,8 @@ public class ApiPayController extends ApiBaseAction {
|
|
entity.setId(processRecordEntity.getId());
|
|
entity.setId(processRecordEntity.getId());
|
|
processRecordEntityList.add(entity);
|
|
processRecordEntityList.add(entity);
|
|
}
|
|
}
|
|
|
|
+ actual_price = actual_price.add(orderInfo.getActual_price());
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
String nonceStr = CharUtil.getRandomString(32);
|
|
String nonceStr = CharUtil.getRandomString(32);
|
|
@@ -123,7 +126,7 @@ public class ApiPayController extends ApiBaseAction {
|
|
}
|
|
}
|
|
//支付金额
|
|
//支付金额
|
|
// parame.put("total_fee", orderInfo.getActual_price().multiply(new BigDecimal(100)).intValue()));//todo 消费金额
|
|
// parame.put("total_fee", orderInfo.getActual_price().multiply(new BigDecimal(100)).intValue()));//todo 消费金额
|
|
- parame.put("total_fee", 1);// 消费金额
|
|
|
|
|
|
+ parame.put("total_fee", actual_price.multiply(new BigDecimal(100)).intValue());// 消费金额
|
|
//parame.put("notify_url", ResourceUtil.getConfigByName("wx.notifyUrl"));// 回调地址
|
|
//parame.put("notify_url", ResourceUtil.getConfigByName("wx.notifyUrl"));// 回调地址
|
|
parame.put("notify_url", WxPayPropertiesBuilder.instance().getNotifyUrl());// 回调地址
|
|
parame.put("notify_url", WxPayPropertiesBuilder.instance().getNotifyUrl());// 回调地址
|
|
//parame.put("trade_type", ResourceUtil.getConfigByName("wx.tradeType"));// 交易类型APP
|
|
//parame.put("trade_type", ResourceUtil.getConfigByName("wx.tradeType"));// 交易类型APP
|
|
@@ -276,7 +279,7 @@ public class ApiPayController extends ApiBaseAction {
|
|
// WechatRefundApiResult result = WechatUtil.wxRefund(orderInfo.getId().toString(),
|
|
// WechatRefundApiResult result = WechatUtil.wxRefund(orderInfo.getId().toString(),
|
|
// orderInfo.getActual_price().doubleValue(), orderInfo.getActual_price().doubleValue());
|
|
// orderInfo.getActual_price().doubleValue(), orderInfo.getActual_price().doubleValue());
|
|
WechatRefundApiResult result = WechatUtil.wxRefund(orderInfo.getMerchOrderSn().toString(),
|
|
WechatRefundApiResult result = WechatUtil.wxRefund(orderInfo.getMerchOrderSn().toString(),
|
|
- 0.01, 0.01);
|
|
|
|
|
|
+ orderInfo.getActual_price().doubleValue(), orderInfo.getActual_price().doubleValue());
|
|
if (result.getResult_code().equals("SUCCESS")) {
|
|
if (result.getResult_code().equals("SUCCESS")) {
|
|
apiPayService.refund(orderInfo,result,"");
|
|
apiPayService.refund(orderInfo,result,"");
|
|
return toResponsObject(400, "成功退款", "");
|
|
return toResponsObject(400, "成功退款", "");
|