提交代码

master
胡锐 5 months ago committed by yuanye
parent ca50a33199
commit 3681028b75
  1. 12
      order/src/main/java/com/order/controller/OrderPayController.java

@ -19,6 +19,7 @@ import com.hfkj.service.order.BsOrderService;
import com.hfkj.service.order.OrderPayService; import com.hfkj.service.order.OrderPayService;
import com.hfkj.service.pay.HuiPayService; import com.hfkj.service.pay.HuiPayService;
import com.hfkj.service.pay.huift.TradeService; import com.hfkj.service.pay.huift.TradeService;
import com.hfkj.service.pay.huift.config.HuiftConfig;
import com.hfkj.sysenum.UserCardTypeEnum; import com.hfkj.sysenum.UserCardTypeEnum;
import com.hfkj.sysenum.mer.PayPlatformEnum; import com.hfkj.sysenum.mer.PayPlatformEnum;
import com.hfkj.sysenum.order.OrderPayChannelEnum; import com.hfkj.sysenum.order.OrderPayChannelEnum;
@ -164,18 +165,19 @@ public class OrderPayController {
if (order.getOrderStatus().equals(OrderStatusEnum.status2.getCode())) { if (order.getOrderStatus().equals(OrderStatusEnum.status2.getCode())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "交易订单不处于待支付"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "交易订单不处于待支付");
} }
order.setPayType(OrderPayTypeEnum.type2.getCode()); order.setPayChannel(OrderPayChannelEnum.type3.getCode());
Long merId = order.getOrderChildList().get(0).getMerId(); order.setPayType(OrderPayTypeEnum.type3.getCode());
/*Long merId = order.getOrderChildList().get(0).getMerId();
// 查询平台 // 查询平台
BsMerPayConfig merPay = merPayConfigService.getMerPay(merId, PayPlatformEnum.type3); BsMerPayConfig merPay = merPayConfigService.getMerPay(merId, PayPlatformEnum.type3);
if (merPay == null) { if (merPay == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "商户未配置支付"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "商户未配置支付");
} }*/
// 请求支付渠道 // 请求支付渠道
JSONObject thirdPreOrder = huiftTradeService.thirdPreOrder(order); JSONObject thirdPreOrder = huiftTradeService.thirdPreOrder(order);
for (OrderChildModel orderChild : order.getOrderChildList()) { for (OrderChildModel orderChild : order.getOrderChildList()) {
orderChild.setSettleAccount(merPay.getPayMerNo()); orderChild.setSettleAccount(HuiftConfig.shopcode);
orderChild.setSettleAccountKey(merPay.getPayMerKey()); orderChild.setSettleAccountKey(HuiftConfig.signSecret);
orderChildService.editData(orderChild); orderChildService.editData(orderChild);
} }
order.setPayChannelOrderNo(thirdPreOrder.getString("preOrderNo")); order.setPayChannelOrderNo(thirdPreOrder.getString("preOrderNo"));

Loading…
Cancel
Save