@@ -6,16 +6,26 @@ import lombok.Data; | |||
* @Author:ChenChao | |||
* @Date:2025/7/12 9:53 | |||
* @Filename:Amount | |||
* @description: 金额信息 v3扣款必填 | |||
* @description: 金额信息 v3扣款 请求和响应公用model | |||
*/ | |||
@Data | |||
public class Amount { | |||
//请求和响应,响应时必填 | |||
@JsonProperty(value = "total") | |||
private Integer total;//订单金额 | |||
/** | |||
* 货币类型】 符合ISO 4217标准的三位字母代码,目前只支持人民币:CNY | |||
*/ | |||
//请求和响应,响应时必填 | |||
@JsonProperty(value = "currency") | |||
private String currency = "CNY"; | |||
//响应 | |||
@JsonProperty(value = "payer_total") | |||
private Integer payerTotal;//【用户支付金额】 用户实际支付金额,单位为分,只能为整数,详见支付金额 | |||
//响应 | |||
@JsonProperty(value = "discount_total") | |||
private Integer discountTotal;//【折扣】 订单折扣百分比,例如:86为八六折。 | |||
} |
@@ -0,0 +1,20 @@ | |||
package cn.com.taiji.core.model.comm.protocol.ats.model; | |||
import com.fasterxml.jackson.annotation.JsonProperty; | |||
import lombok.Data; | |||
/** | |||
* @Author:ChenChao | |||
* @Date:2025/7/14 9:11 | |||
* @Filename:DeductPayerV3 | |||
* @description: | |||
*/ | |||
@Data | |||
public class DeductPayerV3 { | |||
@JsonProperty(value = "sp_openid") | |||
private String spOpenId; | |||
@JsonProperty(value = "sub_openid") | |||
private String subOpenId; | |||
} |
@@ -0,0 +1,38 @@ | |||
package cn.com.taiji.core.model.comm.protocol.ats.weiXin; | |||
import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeRequest; | |||
import cn.com.taiji.core.model.comm.protocol.SignServiceCommand; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import javax.validation.constraints.NotBlank; | |||
/** | |||
* @Author:ChenChao | |||
* @Date:2025/7/14 9:39 | |||
* @Filename:AtsWxDeductResultV3Request | |||
* @description: | |||
*/ | |||
@Getter | |||
@Setter | |||
public class AtsWxDeductResultV3Request extends AbstractSignTypeRequest<AtsWxDeductV3Response> { | |||
protected AtsWxDeductResultV3Request() { | |||
super(WeiXinServiceCmd.WEIXINDEDUCTRESULTV3); | |||
} | |||
@NotBlank | |||
private String outTradeNo;//订单号,自定义订单号 | |||
@NotBlank | |||
protected String mchid;//直连商户号 spMchid;服务商户号 | |||
@NotBlank | |||
private String apiV3Key; // API V3密钥 | |||
@NotBlank | |||
private String privateKey;// 你的商户私钥 apiclient_key.pem | |||
@NotBlank | |||
private String serialNo;// 商户证书序列号 | |||
// @NotBlank | |||
private String publicKey;//商户公钥 | |||
// @NotBlank | |||
private String publicKeyId;//商户公钥ID | |||
} |
@@ -1,6 +1,9 @@ | |||
package cn.com.taiji.core.model.comm.protocol.ats.weiXin; | |||
import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeResponse; | |||
import cn.com.taiji.core.model.comm.protocol.ats.model.Amount; | |||
import cn.com.taiji.core.model.comm.protocol.ats.model.DeductPayerV3; | |||
import cn.com.taiji.core.model.comm.protocol.ats.model.DeviceInfo; | |||
import com.fasterxml.jackson.annotation.JsonProperty; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@@ -52,5 +55,15 @@ public class AtsWxDeductV3Response extends AbstractSignTypeResponse { | |||
@JsonProperty(value = "trade_state_desc") | |||
private String tradeStateDesc;//【交易状态描述】 对当前订单状态的描述和下一步操作的指引 | |||
@JsonProperty(value = "amount") | |||
private Amount amount;//【订单金额】 订单金额信息 | |||
@JsonProperty(value = "payer") | |||
private DeductPayerV3 payer; | |||
@JsonProperty(value = "device_info") | |||
private DeviceInfo deviceInfo;//设备信息 | |||
} |
@@ -21,6 +21,7 @@ public enum WeiXinServiceCmd implements SignServiceCommand { | |||
WEIXINDEDUCTV2("微信V2扣款","weiXinDeDuctV2", AtsWxDeductV2Request.class), | |||
WEIXINDEDUCTV3("微信V3扣款","weiXinDeDuctV3", AtsWxDeductV3Request.class), | |||
WEIXINDEDUCTRESULTV2("微信V2扣款结果查询","weiXinDeDuctResultV2", AtsWxDeductResultV2Request.class), | |||
WEIXINDEDUCTRESULTV3("微信V3扣款结果查询","weiXinDeDuctResultV3", AtsWxDeductResultV3Request.class), | |||
MPSENDMESSAGE("微信公众号发送订阅信息","mpSendMessage", WxMpSendMessageRequest.class), | |||
MPMESSAGELIST("微信公众号获取模板列表","mpMessageList", WxMpMessageTemplateListRequest.class), | |||
MPISSUBSCRIBED("微信公众号是否订阅","isSubscribed", WxMpIsSubscribedRequest.class), |