设备商城支付开发

This commit is contained in:
zhujunshuai 2023-04-18 10:59:24 +08:00
parent c14ab93262
commit 7e96155e8d
3 changed files with 9 additions and 4 deletions

View File

@ -161,7 +161,7 @@ public class Constant {
/**
* 默认通道
*/
public static final Integer DEFAULT_CHANNEL = 4;
public static final Integer DEFAULT_CHANNEL = 1;
/**
* 支付宝H5支付前缀

View File

@ -16,6 +16,7 @@ import cn.pluss.platform.mapper.*;
import cn.pluss.platform.openAccount.OpenAccountRecordService;
import cn.pluss.platform.pay.PayService;
import cn.pluss.platform.postageConfig.PostageConfigService;
import cn.pluss.platform.sxf.pay.SxfPayService;
import cn.pluss.platform.systemConfig.SystemConfigService;
import cn.pluss.platform.userAddress.UserAddressService;
import cn.pluss.platform.userApp.UserAppService;
@ -108,6 +109,9 @@ public class MercOrderNewServiceImpl extends ServiceImpl<MercOrderNewMapper, Mer
@Resource
private MerchantStoreMapper merchantStoreMapper;
@Resource
private SxfPayService sxfPayService;
/**
* 设备订单分页查询
*
@ -446,13 +450,13 @@ public class MercOrderNewServiceImpl extends ServiceImpl<MercOrderNewMapper, Mer
Integer channel = order.getChannel();
MsgException.checkNull(channel, "未知通道");
switch (channel) {
case 4:
case 1:
//银盛通道
MerchantChannelStatus channelStatus = mcsMapper.getByMerchantCode(order.getMerchantCode(), channel);
MsgException.checkNull(channelStatus, "当前通道信息异常!");
MerchantOrder mo = new MerchantOrder();
order.convert(mo, null);
JSONObject resp = ysPayOldService.tradeQuery(mo, channelStatus.getMerchantId());
JSONObject resp = sxfPayService.tradeQuery(mo, channelStatus.getMerchantId());
if (ResultCode.FAIL.code() == resp.getIntValue("code")) {
MsgException.throwException("查询失败:失败原因:" + resp.getString("msg"));
}

View File

@ -700,7 +700,8 @@ public class ApiPayServiceImpl implements ApiPayService {
order.setMercUserId(userId);
order.setAlias(merchant.getMerchantName());
try {
JSONObject result = ysPayOldService.tradePay(order, channel,merchant);
JSONObject result = sxfPayService.tradePay(order, channel,merchant);
if(ResultCode.SUCCESS.code() != result.getInteger("code")){
return ResultGenerator.genFailResult(result.getString("msg"));
}