mirror of
https://gitee.com/dromara/dax-pay
synced 2026-08-10 06:46:04 +08:00
style 一些常量和参数的调整
This commit is contained in:
@@ -1,26 +1,25 @@
|
||||
|
||||
2.0.3:
|
||||
- [ ] 云闪付接入
|
||||
- [x] 云闪付接入
|
||||
- [x] 支付
|
||||
- [x] 退款
|
||||
- [x] 同步
|
||||
- [ ] 对账
|
||||
- [x] 回调
|
||||
- [ ] 统一关闭接口增加使用撤销关闭订单
|
||||
- [x] 手动触发通知消息发送
|
||||
- [x] 退款操作支持重试
|
||||
- [x] 通知任务增加订单的状态类型,例如订单关闭、成功、失败等
|
||||
- [ ] 支付流程也改为先落库后支付情况, 避免极端情况导致掉单
|
||||
- [ ] 优化发起请求时IP的获取逻辑
|
||||
- [ ] 增加定时同步退款中的退款订单
|
||||
- [ ] 优化发起请求时IP的获取逻辑, 请求参数传输的ip -> 客户端ID -> 服务器ID,
|
||||
- [x] 增加定时同步退款中的退款订单
|
||||
|
||||
2.0.x 版本内容
|
||||
- [ ] 统一关闭接口增加使用撤销关闭订单
|
||||
- [ ] 首页驾驶舱功能: 各通道收入和支付情况
|
||||
- [ ] 增加各类日志记录,例如钱包的各项操作
|
||||
- [ ] 支付流程涉及异步支付时, 更换支付方式需要控制预防客户重复付款
|
||||
- [ ] 增加撤销功能,用于处理线下支付订单的情况
|
||||
- [ ] 数据库表进行规则, 字段设置长度, 增加索引
|
||||
- [ ] 回调处理可以配置延迟时间,
|
||||
|
||||
**任务池**
|
||||
- [x] 支付SDK编写
|
||||
|
||||
@@ -13,7 +13,8 @@ import lombok.Getter;
|
||||
public enum RefundSyncStatusEnum {
|
||||
SUCCESS("refund_success","退款成功"),
|
||||
FAIL("refund_fail","退款失败"),
|
||||
PROGRESS("refund_progress","退款中");
|
||||
PROGRESS("refund_progress","退款中"),
|
||||
NOT_FOUND("pay_not_found", "交易不存在");
|
||||
|
||||
/** 编码 */
|
||||
private final String code;
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package cn.bootx.platform.daxpay.sdk.param.channel;
|
||||
|
||||
import cn.bootx.platform.daxpay.sdk.param.ChannelParam;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* 云闪付参数
|
||||
* @author xxm
|
||||
* @since 2024/3/13
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class UnionPayParam implements ChannelParam {
|
||||
|
||||
/** 授权码(主动扫描用户的付款码) */
|
||||
private String authCode;
|
||||
|
||||
}
|
||||
@@ -1,7 +1,16 @@
|
||||
package cn.bootx.platform.daxpay.admin.controller.channel;
|
||||
|
||||
import cn.bootx.platform.common.core.rest.PageResult;
|
||||
import cn.bootx.platform.common.core.rest.Res;
|
||||
import cn.bootx.platform.common.core.rest.ResResult;
|
||||
import cn.bootx.platform.common.core.rest.param.PageParam;
|
||||
import cn.bootx.platform.daxpay.service.core.channel.union.service.UnionPayRecordService;
|
||||
import cn.bootx.platform.daxpay.service.dto.channel.union.UnionPayRecordDto;
|
||||
import cn.bootx.platform.daxpay.service.param.channel.union.UnionPayRecordQuery;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@@ -15,4 +24,18 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RequestMapping("/union/pay")
|
||||
@RequiredArgsConstructor
|
||||
public class UnionPayController {
|
||||
|
||||
private final UnionPayRecordService unionPayRecordService;;
|
||||
|
||||
@Operation(summary = "记录分页")
|
||||
@GetMapping("/record/page")
|
||||
public ResResult<PageResult<UnionPayRecordDto>> recordPage(PageParam pageParam, UnionPayRecordQuery query){
|
||||
return Res.ok(unionPayRecordService.page(pageParam, query));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询记录详情")
|
||||
@GetMapping("/record/findById")
|
||||
public ResResult<UnionPayRecordDto> findById(Long id){
|
||||
return Res.ok(unionPayRecordService.findById(id));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,6 @@ public class WeChatPayController {
|
||||
return Res.ok(weChatPayRecordService.page(pageParam, query));
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "查询记录详情")
|
||||
@GetMapping("/record/findById")
|
||||
public ResResult<WeChatPayRecordDto> findById(Long id){
|
||||
|
||||
@@ -28,7 +28,7 @@ public enum PaySyncStatusEnum {
|
||||
* 所以查询为了区分,增加一个未知的状态, 用于处理这种特殊情况, 然后根据业务需要,关闭订单或者进行其他操作
|
||||
*/
|
||||
NOT_FOUND_UNKNOWN("pay_not_found_unknown","交易不存在(特殊)"),
|
||||
/** 本地订单到了超时时间, 但是网关和本地都未关闭, 需要触发关闭相关处理, 可以进行手动设置 */
|
||||
/** 订单到了超时时间, 不分情况可以进行手动设置支付超时状态 */
|
||||
TIMEOUT("pay_timeout", "支付超时");
|
||||
|
||||
/** 编码 */
|
||||
|
||||
@@ -12,43 +12,7 @@ import lombok.Data;
|
||||
@Schema(title = "云闪付支付参数")
|
||||
public class UnionPayParam {
|
||||
|
||||
@Schema(description = "微信openId")
|
||||
private String openId;
|
||||
|
||||
@Schema(description = "授权码(主动扫描用户的付款码)")
|
||||
private String authCode;
|
||||
|
||||
/**
|
||||
* 银联JS支付时进行传输
|
||||
*/
|
||||
@Schema(description = "用户ID")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 用户的外网ip,需要与访问银联支付页面的ip一致,银联会进行校验
|
||||
*/
|
||||
@Schema(description = "用户ip")
|
||||
private String customerIp;
|
||||
|
||||
/**
|
||||
* 商户app对应的微信开放平台移动应用APPID
|
||||
* 微信APP支付时进行传输
|
||||
*/
|
||||
@Schema(description = "移动应用APPID")
|
||||
private String appId;
|
||||
|
||||
/**
|
||||
* 微信开放平台审核通过的移动应用AppID
|
||||
* 微信APP支付时进行传输
|
||||
*/
|
||||
@Schema(description = "移动应用AppID")
|
||||
private String subAppId;
|
||||
|
||||
/**
|
||||
* 买家支付宝用户ID
|
||||
* 支付宝服务窗时传输
|
||||
*/
|
||||
@Schema(description = "微信支付授权码")
|
||||
private String buyerId;
|
||||
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ public class UnionPayWay {
|
||||
|
||||
// 支付方式
|
||||
private static final List<PayWayEnum> PAY_WAYS = Arrays.asList(PayWayEnum.WAP, PayWayEnum.APP, PayWayEnum.WEB,
|
||||
PayWayEnum.JSAPI, PayWayEnum.QRCODE, PayWayEnum.BARCODE,PayWayEnum.B2B);
|
||||
PayWayEnum.JSAPI, PayWayEnum.QRCODE, PayWayEnum.BARCODE );
|
||||
|
||||
/**
|
||||
* 根据编码获取
|
||||
|
||||
@@ -84,7 +84,7 @@ public class UnionPayService {
|
||||
else if (payWayEnum == PayWayEnum.WAP) {
|
||||
payBody = this.formPay(totalFee, payOrder, unionPayKit, UnionTransactionType.WAP );
|
||||
}
|
||||
// b2b支付
|
||||
// b2b支付 TODO 未完成
|
||||
else if (payWayEnum == PayWayEnum.B2B) {
|
||||
payBody = this.b2bPay(totalFee, payOrder, unionPayKit);
|
||||
}
|
||||
@@ -102,7 +102,6 @@ public class UnionPayService {
|
||||
unionPayOrder.setOutTradeNo(String.valueOf(payOrder.getId()));
|
||||
unionPayOrder.setSubject(payOrder.getTitle());
|
||||
unionPayOrder.setPrice(amount);
|
||||
unionPayOrder.setBankType();
|
||||
unionPayOrder.setExpirationTime(expiredTime);
|
||||
unionPayOrder.setTransactionType(type);
|
||||
return unionPayKit.toPay(unionPayOrder);
|
||||
|
||||
Reference in New Issue
Block a user