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