mirror of
https://gitee.com/dromara/dax-pay.git
synced 2025-09-03 11:06:46 +00:00
feat 联调wap和web支付
This commit is contained in:
@@ -4,6 +4,7 @@ import cn.bootx.platform.common.core.exception.DataNotExistException;
|
||||
import cn.bootx.platform.common.core.rest.PageResult;
|
||||
import cn.bootx.platform.common.core.rest.param.PageParam;
|
||||
import cn.bootx.platform.common.mybatisplus.util.MpUtil;
|
||||
import cn.bootx.platform.daxpay.exception.waller.WalletNotExistsException;
|
||||
import cn.bootx.platform.daxpay.param.channel.WalletPayParam;
|
||||
import cn.bootx.platform.daxpay.service.core.channel.wallet.dao.WalletManager;
|
||||
import cn.bootx.platform.daxpay.service.core.channel.wallet.entity.Wallet;
|
||||
@@ -64,10 +65,10 @@ public class WalletQueryService {
|
||||
|
||||
Wallet wallet = null;
|
||||
if (Objects.nonNull(param.getWalletId())){
|
||||
wallet = walletManager.findById(param.getWalletId()).orElseThrow(DataNotExistException::new);
|
||||
wallet = walletManager.findById(param.getWalletId()).orElseThrow(WalletNotExistsException::new);
|
||||
}
|
||||
if (Objects.isNull(wallet)){
|
||||
wallet = walletManager.findByUser(param.getUserId()).orElseThrow(DataNotExistException::new);
|
||||
wallet = walletManager.findByUser(param.getUserId()).orElseThrow(WalletNotExistsException::new);
|
||||
}
|
||||
return wallet;
|
||||
}
|
||||
|
@@ -54,8 +54,14 @@ public class PayReturnService {
|
||||
}
|
||||
|
||||
public String union(UnionPayReturnParam param) {
|
||||
PayOrderExtra payOrderExtra = payOrderExtraManager.findById(param.getOrderNo()).orElse(null);
|
||||
PayOrder prOrder = payOrderQueryService.findById(Long.valueOf(param.getOrderNo())).orElse(null);
|
||||
// 获取orderId
|
||||
String orderId = param.getOrderId();
|
||||
if (StrUtil.isBlank(orderId)){
|
||||
orderId = param.getOrderNo();
|
||||
}
|
||||
|
||||
PayOrderExtra payOrderExtra = payOrderExtraManager.findById(orderId).orElse(null);
|
||||
PayOrder prOrder = payOrderQueryService.findById(Long.valueOf(orderId)).orElse(null);
|
||||
if (Objects.isNull(payOrderExtra) || Objects.isNull(prOrder)){
|
||||
return StrUtil.format("{}/result/error?msg={}", properties.getFrontH5Url(), URLEncodeUtil.encode("支付订单有问题,请排查"));
|
||||
}
|
||||
|
@@ -6,6 +6,7 @@ import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 云闪付同步回调参数
|
||||
* 不同支付方式回调的字段会不一样
|
||||
* @author xxm
|
||||
* @since 2024/2/11
|
||||
*/
|
||||
@@ -13,24 +14,8 @@ import lombok.experimental.Accessors;
|
||||
@Accessors(chain = true)
|
||||
@Schema(title = "云闪付同步回调参数")
|
||||
public class UnionPayReturnParam {
|
||||
/** 条码支付返回的 */
|
||||
private String orderNo;
|
||||
private String signature;
|
||||
private String merName;
|
||||
private String settleDate;
|
||||
private String certId;
|
||||
private String voucherNum;
|
||||
private String version;
|
||||
private String settleKey;
|
||||
private String termId;
|
||||
private String origReqType;
|
||||
private String qrNo;
|
||||
private String reqReserved;
|
||||
private String reqType;
|
||||
private String origRespMsg;
|
||||
private String comInfo;
|
||||
private String merId;
|
||||
private String merCatCode;
|
||||
private String currencyCode;
|
||||
private String origRespCode;
|
||||
private String txnAmt;
|
||||
/** Web/Wap支付返回的 */
|
||||
private String orderId;
|
||||
}
|
||||
|
Reference in New Issue
Block a user