设备商城支付开发
This commit is contained in:
parent
c14ab93262
commit
7e96155e8d
|
|
@ -161,7 +161,7 @@ public class Constant {
|
||||||
/**
|
/**
|
||||||
* 默认通道
|
* 默认通道
|
||||||
*/
|
*/
|
||||||
public static final Integer DEFAULT_CHANNEL = 4;
|
public static final Integer DEFAULT_CHANNEL = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支付宝H5支付前缀
|
* 支付宝H5支付前缀
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ import cn.pluss.platform.mapper.*;
|
||||||
import cn.pluss.platform.openAccount.OpenAccountRecordService;
|
import cn.pluss.platform.openAccount.OpenAccountRecordService;
|
||||||
import cn.pluss.platform.pay.PayService;
|
import cn.pluss.platform.pay.PayService;
|
||||||
import cn.pluss.platform.postageConfig.PostageConfigService;
|
import cn.pluss.platform.postageConfig.PostageConfigService;
|
||||||
|
import cn.pluss.platform.sxf.pay.SxfPayService;
|
||||||
import cn.pluss.platform.systemConfig.SystemConfigService;
|
import cn.pluss.platform.systemConfig.SystemConfigService;
|
||||||
import cn.pluss.platform.userAddress.UserAddressService;
|
import cn.pluss.platform.userAddress.UserAddressService;
|
||||||
import cn.pluss.platform.userApp.UserAppService;
|
import cn.pluss.platform.userApp.UserAppService;
|
||||||
|
|
@ -108,6 +109,9 @@ public class MercOrderNewServiceImpl extends ServiceImpl<MercOrderNewMapper, Mer
|
||||||
@Resource
|
@Resource
|
||||||
private MerchantStoreMapper merchantStoreMapper;
|
private MerchantStoreMapper merchantStoreMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SxfPayService sxfPayService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备订单分页查询
|
* 设备订单分页查询
|
||||||
*
|
*
|
||||||
|
|
@ -446,13 +450,13 @@ public class MercOrderNewServiceImpl extends ServiceImpl<MercOrderNewMapper, Mer
|
||||||
Integer channel = order.getChannel();
|
Integer channel = order.getChannel();
|
||||||
MsgException.checkNull(channel, "未知通道");
|
MsgException.checkNull(channel, "未知通道");
|
||||||
switch (channel) {
|
switch (channel) {
|
||||||
case 4:
|
case 1:
|
||||||
//银盛通道
|
//银盛通道
|
||||||
MerchantChannelStatus channelStatus = mcsMapper.getByMerchantCode(order.getMerchantCode(), channel);
|
MerchantChannelStatus channelStatus = mcsMapper.getByMerchantCode(order.getMerchantCode(), channel);
|
||||||
MsgException.checkNull(channelStatus, "当前通道信息异常!");
|
MsgException.checkNull(channelStatus, "当前通道信息异常!");
|
||||||
MerchantOrder mo = new MerchantOrder();
|
MerchantOrder mo = new MerchantOrder();
|
||||||
order.convert(mo, null);
|
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")) {
|
if (ResultCode.FAIL.code() == resp.getIntValue("code")) {
|
||||||
MsgException.throwException("查询失败:失败原因:" + resp.getString("msg"));
|
MsgException.throwException("查询失败:失败原因:" + resp.getString("msg"));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -700,7 +700,8 @@ public class ApiPayServiceImpl implements ApiPayService {
|
||||||
order.setMercUserId(userId);
|
order.setMercUserId(userId);
|
||||||
order.setAlias(merchant.getMerchantName());
|
order.setAlias(merchant.getMerchantName());
|
||||||
try {
|
try {
|
||||||
JSONObject result = ysPayOldService.tradePay(order, channel,merchant);
|
JSONObject result = sxfPayService.tradePay(order, channel,merchant);
|
||||||
|
|
||||||
if(ResultCode.SUCCESS.code() != result.getInteger("code")){
|
if(ResultCode.SUCCESS.code() != result.getInteger("code")){
|
||||||
return ResultGenerator.genFailResult(result.getString("msg"));
|
return ResultGenerator.genFailResult(result.getString("msg"));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue