mirror of
https://gitee.com/dromara/dax-pay.git
synced 2025-09-08 13:37:35 +00:00
ref 同步接口调整
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
package cn.daxpay.single.sdk.model.sync;
|
||||
|
||||
import cn.daxpay.single.sdk.code.RefundSyncStatusEnum;
|
||||
import cn.daxpay.single.sdk.net.DaxPayResponseModel;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* 退款信息同步结果
|
||||
* @author xxm
|
||||
* @since 2024/2/7
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public class RefundSyncModel extends DaxPayResponseModel {
|
||||
|
||||
/**
|
||||
* 支付网关同步结果
|
||||
* @see RefundSyncStatusEnum
|
||||
*
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/** 是否进行了修复 */
|
||||
private boolean repair;
|
||||
|
||||
/** 修复号 */
|
||||
private String repairOrderNo;
|
||||
|
||||
}
|
@@ -7,25 +7,19 @@ import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* 支付订单同步结果
|
||||
* 交易同步结果
|
||||
* @author xxm
|
||||
* @since 2023/12/27
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public class PaySyncModel extends DaxPayResponseModel {
|
||||
public class SyncModel extends DaxPayResponseModel {
|
||||
|
||||
/**
|
||||
* 支付订单同步结果
|
||||
* @see PaySyncStatusEnum
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/** 是否进行了修复 */
|
||||
private boolean repair;
|
||||
|
||||
/** 修复号 */
|
||||
private String repairOrderNo;
|
||||
private Boolean status;
|
||||
|
||||
}
|
@@ -1,6 +1,6 @@
|
||||
package cn.daxpay.single.sdk.param.sync;
|
||||
|
||||
import cn.daxpay.single.sdk.model.sync.PaySyncModel;
|
||||
import cn.daxpay.single.sdk.model.sync.SyncModel;
|
||||
import cn.daxpay.single.sdk.net.DaxPayRequest;
|
||||
import cn.daxpay.single.sdk.response.DaxPayResult;
|
||||
import cn.hutool.core.lang.TypeReference;
|
||||
@@ -15,8 +15,7 @@ import lombok.Setter;
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class PaySyncParam extends DaxPayRequest<PaySyncModel> {
|
||||
|
||||
public class PaySyncParam extends DaxPayRequest<SyncModel> {
|
||||
|
||||
/** 订单号 */
|
||||
private String orderNo;
|
||||
@@ -36,7 +35,7 @@ public class PaySyncParam extends DaxPayRequest<PaySyncModel> {
|
||||
* 将请求返回结果反序列化为实体类
|
||||
*/
|
||||
@Override
|
||||
public DaxPayResult<PaySyncModel> toModel(String json) {
|
||||
return JSONUtil.toBean(json, new TypeReference<DaxPayResult<PaySyncModel>>() {}, false);
|
||||
public DaxPayResult<SyncModel> toModel(String json) {
|
||||
return JSONUtil.toBean(json, new TypeReference<DaxPayResult<SyncModel>>() {}, false);
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package cn.daxpay.single.sdk.param.sync;
|
||||
|
||||
import cn.daxpay.single.sdk.model.sync.RefundSyncModel;
|
||||
import cn.daxpay.single.sdk.model.sync.SyncModel;
|
||||
import cn.daxpay.single.sdk.net.DaxPayRequest;
|
||||
import cn.daxpay.single.sdk.response.DaxPayResult;
|
||||
import cn.hutool.core.lang.TypeReference;
|
||||
@@ -15,7 +15,7 @@ import lombok.Setter;
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class RefundSyncParam extends DaxPayRequest<RefundSyncModel> {
|
||||
public class RefundSyncParam extends DaxPayRequest<SyncModel> {
|
||||
|
||||
/** 退款号 */
|
||||
private String refundNo;
|
||||
@@ -35,7 +35,7 @@ public class RefundSyncParam extends DaxPayRequest<RefundSyncModel> {
|
||||
* 将请求返回结果反序列化为实体类
|
||||
*/
|
||||
@Override
|
||||
public DaxPayResult<RefundSyncModel> toModel(String json) {
|
||||
return JSONUtil.toBean(json, new TypeReference<DaxPayResult<RefundSyncModel>>() {}, false);
|
||||
public DaxPayResult<SyncModel> toModel(String json) {
|
||||
return JSONUtil.toBean(json, new TypeReference<DaxPayResult<SyncModel>>() {}, false);
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package cn.daxpay.single.sdk.payment;
|
||||
|
||||
import cn.daxpay.single.sdk.code.SignTypeEnum;
|
||||
import cn.daxpay.single.sdk.model.sync.PaySyncModel;
|
||||
import cn.daxpay.single.sdk.model.sync.SyncModel;
|
||||
import cn.daxpay.single.sdk.net.DaxPayConfig;
|
||||
import cn.daxpay.single.sdk.net.DaxPayKit;
|
||||
import cn.daxpay.single.sdk.param.sync.PaySyncParam;
|
||||
@@ -31,10 +31,8 @@ public class PayOrderSyncTest {
|
||||
@Test
|
||||
public void testPay() {
|
||||
PaySyncParam param = new PaySyncParam();
|
||||
|
||||
param.setBizOrderNo("P0001");
|
||||
|
||||
DaxPayResult<PaySyncModel> execute = DaxPayKit.execute(param);
|
||||
param.setBizOrderNo("SDK_1715341621498");
|
||||
DaxPayResult<SyncModel> execute = DaxPayKit.execute(param);
|
||||
System.out.println(execute);
|
||||
System.out.println(execute.getData());
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package cn.daxpay.single.sdk.payment;
|
||||
|
||||
import cn.daxpay.single.sdk.code.SignTypeEnum;
|
||||
import cn.daxpay.single.sdk.model.sync.RefundSyncModel;
|
||||
import cn.daxpay.single.sdk.model.sync.SyncModel;
|
||||
import cn.daxpay.single.sdk.net.DaxPayConfig;
|
||||
import cn.daxpay.single.sdk.net.DaxPayKit;
|
||||
import cn.daxpay.single.sdk.param.sync.RefundSyncParam;
|
||||
@@ -34,7 +34,7 @@ public class RefundOrderSyncTest {
|
||||
|
||||
param.setRefundNo("R0001");
|
||||
|
||||
DaxPayResult<RefundSyncModel> execute = DaxPayKit.execute(param);
|
||||
DaxPayResult<SyncModel> execute = DaxPayKit.execute(param);
|
||||
System.out.println(execute);
|
||||
System.out.println(execute.getData());
|
||||
}
|
||||
|
Reference in New Issue
Block a user