添加设备商城支付
This commit is contained in:
@@ -12,7 +12,7 @@ public interface ApiPayService {
|
||||
|
||||
JSONObject pay(String json,String ip);
|
||||
|
||||
Result<Object> orderPay(String userId, String orderNumber);
|
||||
Result<Object> orderPay(String userId, String orderNumber,String appId);
|
||||
|
||||
/**
|
||||
* @description:退款
|
||||
|
||||
@@ -652,7 +652,7 @@ public class ApiPayServiceImpl implements ApiPayService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<Object> orderPay(String userId, String orderNumber) {
|
||||
public Result<Object> orderPay(String userId, String orderNumber,String appId) {
|
||||
if(StringUtil.isEmpty(userId)){
|
||||
return ResultGenerator.genFailResult("缺失参数!");
|
||||
}
|
||||
@@ -698,11 +698,15 @@ public class ApiPayServiceImpl implements ApiPayService {
|
||||
if(mercOrderNew == null){
|
||||
order = oldPay(userId,orderNumber,order);
|
||||
}
|
||||
Long cTime = order.getCreateDt().getTime();
|
||||
Long nowTime = System.currentTimeMillis();
|
||||
if(nowTime - cTime >= 1000 * 60 * 1000){
|
||||
return ResultGenerator.genFailResult("订单已超时,请重新下单!");
|
||||
|
||||
if(ObjectUtil.isNotEmpty(order)){
|
||||
Long cTime = order.getCreateDt().getTime();
|
||||
Long nowTime = System.currentTimeMillis();
|
||||
if(nowTime - cTime >= 1000 * 60 * 1000){
|
||||
return ResultGenerator.genFailResult("订单已超时,请重新下单!");
|
||||
}
|
||||
}
|
||||
|
||||
if(StringUtil.isNotEmpty(order.getPayData())){
|
||||
return ResultGenerator.genSuccessResult("获取成功",JSONObject.parseObject(order.getPayData()));
|
||||
}
|
||||
@@ -730,6 +734,7 @@ public class ApiPayServiceImpl implements ApiPayService {
|
||||
|
||||
// TODO 测试金额上线会删除
|
||||
order.setConsumeFee(mercOrderNew.getActualAmt().doubleValue());
|
||||
order.setAppletsAppid(appId);
|
||||
|
||||
JSONObject result = sxfPayService.tradePay(order, channel,merchant);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user