diff --git a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/ContractStatus.java b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/ContractStatus.java index 17625b5..f3fc108 100644 --- a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/ContractStatus.java +++ b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/ContractStatus.java @@ -1,3 +1,20 @@ +/* + * + * Copyright 2019-2020 felord.cn + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * Website: + * https://felord.cn + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package cn.felord.payment.wechat.enumeration; /** diff --git a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/CountType.java b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/CountType.java index 4fc2730..216ca86 100644 --- a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/CountType.java +++ b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/CountType.java @@ -15,7 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package cn.felord.payment.wechat.enumeration; /** diff --git a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/StrategyType.java b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/StrategyType.java index 2aa3bbc..6322c47 100644 --- a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/StrategyType.java +++ b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/StrategyType.java @@ -1,3 +1,20 @@ +/* + * + * Copyright 2019-2020 felord.cn + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * Website: + * https://felord.cn + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package cn.felord.payment.wechat.enumeration; /** diff --git a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/UnfinishedReason.java b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/UnfinishedReason.java new file mode 100644 index 0000000..f705629 --- /dev/null +++ b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/UnfinishedReason.java @@ -0,0 +1,36 @@ +/* + * + * Copyright 2019-2020 felord.cn + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * Website: + * https://felord.cn + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package cn.felord.payment.wechat.enumeration; + +/** + * 未完成约定原因 + *
+ * 当订单守约状态为{@link ContractStatus#UNFINISHED},返回此字段
+ *
+ * @since 1.0.3.RELEASE
+ */
+public enum UnfinishedReason {
+ /**
+ * 到期未完成约
+ */
+ DUE_TO_QUIT,
+ /**
+ * 提前退出约定
+ */
+ EARLY_QUIT
+}
diff --git a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/WechatPayV3Type.java b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/WechatPayV3Type.java
index 4ca20a2..c8decc6 100644
--- a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/WechatPayV3Type.java
+++ b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/WechatPayV3Type.java
@@ -107,19 +107,19 @@ public enum WechatPayV3Type {
*
* @since 1.0.0.RELEASE
*/
- COMBINE_JSAPI(HttpMethod.POST, "%s/v3/pay/combine-transactions/jsapi"),
+ COMBINE_JSAPI(HttpMethod.POST, "%s/v3/combine-transactions/jsapi"),
/**
* 合单下单-H5支付API.
*
* @since 1.0.0.RELEASE
*/
- COMBINE_MWEB(HttpMethod.POST, "%s/v3/pay/combine-transactions/h5"),
+ COMBINE_MWEB(HttpMethod.POST, "%s/v3/combine-transactions/h5"),
/**
* 合单下单-Native支付API.
*
* @since 1.0.0.RELEASE
*/
- COMBINE_NATIVE(HttpMethod.POST, "%s/v3/pay/combine-transactions/native"),
+ COMBINE_NATIVE(HttpMethod.POST, "%s/v3/combine-transactions/native"),
/**
* 合单查询订单API.
*
diff --git a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatPayCallback.java b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatPayCallback.java
index ddc9301..9a0ae13 100644
--- a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatPayCallback.java
+++ b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatPayCallback.java
@@ -24,6 +24,7 @@ import cn.felord.payment.wechat.v3.model.ResponseSignVerifyParams;
import cn.felord.payment.wechat.v3.model.TransactionConsumeData;
import cn.felord.payment.wechat.v3.model.combine.CombineTransactionConsumeData;
import cn.felord.payment.wechat.v3.model.discountcard.*;
+import cn.felord.payment.wechat.v3.model.payscore.PayScoreConsumer;
import cn.felord.payment.wechat.v3.model.payscore.PayScoreUserConfirmConsumeData;
import cn.felord.payment.wechat.v3.model.payscore.PayScoreUserPaidConsumeData;
import cn.felord.payment.wechat.v3.model.payscore.PayScoreUserPermissionConsumeData;
diff --git a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/discountcard/DiscountCardAgreementEndConsumeData.java b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/discountcard/DiscountCardAgreementEndConsumeData.java
index f900e2b..f185b9d 100644
--- a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/discountcard/DiscountCardAgreementEndConsumeData.java
+++ b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/discountcard/DiscountCardAgreementEndConsumeData.java
@@ -19,6 +19,7 @@ package cn.felord.payment.wechat.v3.model.discountcard;
import cn.felord.payment.wechat.enumeration.ContractStatus;
import cn.felord.payment.wechat.enumeration.CountType;
+import cn.felord.payment.wechat.enumeration.UnfinishedReason;
import lombok.Data;
import java.util.List;
@@ -108,7 +109,7 @@ public class DiscountCardAgreementEndConsumeData {
*/
private String name;
/**
- * The Objective completion records.
+ * 用户先享卡目标完成纪录
*/
private List
- * 当订单守约状态为{@link ContractStatus#UNFINISHED},返回此字段
- *
- * @since 1.0.3.RELEASE
- */
- enum UnfinishedReason {
- /**
- * 到期未完成约
- */
- DUE_TO_QUIT,
- /**
- * 提前退出约定
- */
- EARLY_QUIT
- }
-
}
diff --git a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/discountcard/DiscountCardConsumer.java b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/discountcard/DiscountCardConsumer.java
index 55220a8..c4ad7c9 100644
--- a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/discountcard/DiscountCardConsumer.java
+++ b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/discountcard/DiscountCardConsumer.java
@@ -14,7 +14,6 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
package cn.felord.payment.wechat.v3.model.discountcard;
@@ -31,15 +30,15 @@ import java.util.function.Consumer;
@Data
public class DiscountCardConsumer {
/**
- * The Accepted consume data consumer.
+ * 用户领取微信先享卡通知解密
*/
private Consumer
+ * 当状态为{@link ContractStatus#UNFINISHED}(用户未完成约定)时,且需要退回已享受的优惠金额时,返回此字段;
*/
@Data
public static class PayInformation {
/**
- * The Pay amount.
+ * 付款金额,用户需要退回优惠而付款的金额,单位为:分;
*/
private Long payAmount;
/**
- * The Pay state.
+ * 用户付款状态,
*/
- private String payState;
+ private PayState payState;
/**
- * The Pay time.
+ * 付款时间
*/
private String payTime;
/**
- * The Transaction id.
+ * 微信支付订单号,仅在订单成功收款时才返回
*/
private String transactionId;
}
+
+ /**
+ * 付款状态
+ * @since 1.0.3.RELEASE
+ */
+ public enum PayState {
+ /**
+ * 付款中
+ */
+ PAYING,
+ /**
+ * 已付款
+ */
+ PAID
+ }
}
diff --git a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/discountcard/ObjectiveCompletionRecord.java b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/discountcard/ObjectiveCompletionRecord.java
index f4f1de9..08a449b 100644
--- a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/discountcard/ObjectiveCompletionRecord.java
+++ b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/discountcard/ObjectiveCompletionRecord.java
@@ -14,7 +14,6 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
package cn.felord.payment.wechat.v3.model.discountcard;
@@ -22,7 +21,7 @@ import cn.felord.payment.wechat.enumeration.StrategyType;
import lombok.Data;
/**
- * The type Objective completion record.
+ * 微信先享卡目标完成纪录
*
* @author felord.cn
* @since 1.0.2.RELEASE
@@ -31,31 +30,31 @@ import lombok.Data;
public class ObjectiveCompletionRecord {
/**
- * The Completion count.
+ * 目标完成数量
*/
private Long completionCount;
/**
- * The Completion time.
+ * 目标完成时间
*/
private String completionTime;
/**
- * The Completion type.
+ * 目标完成类型
*/
private StrategyType completionType;
/**
- * The Description.
+ * 目标完成描述
*/
private String description;
/**
- * The Objective completion serial no.
+ * 目标完成流水号
*/
private String objectiveCompletionSerialNo;
/**
- * The Objective id.
+ * 目标id
*/
private String objectiveId;
/**
- * The Remark.
+ * 备注说明
*/
private String remark;
diff --git a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/discountcard/RewardUsageRecord.java b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/discountcard/RewardUsageRecord.java
index b9841c8..d247874 100644
--- a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/discountcard/RewardUsageRecord.java
+++ b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/discountcard/RewardUsageRecord.java
@@ -14,7 +14,6 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
package cn.felord.payment.wechat.v3.model.discountcard;
@@ -22,7 +21,7 @@ import cn.felord.payment.wechat.enumeration.StrategyType;
import lombok.Data;
/**
- * The type Reward usage record.
+ * 优惠使用纪录列表对象
*
* @author felord.cn
* @since 1.0.2.RELEASE
@@ -31,35 +30,40 @@ import lombok.Data;
public class RewardUsageRecord {
/**
- * The Amount.
+ * 优惠金额
+ *
+ *
+ *
*/
private Long amount;
/**
- * The Description.
+ * 优惠使用描述
*/
private String description;
/**
- * The Remark.
+ * 备注说明
*/
private String remark;
/**
- * The Reward id.
+ * 优惠Id
*/
private String rewardId;
/**
- * The Reward usage serial no.
+ * 优惠使用纪录流水号
*/
private String rewardUsageSerialNo;
/**
- * The Usage count.
+ * 优惠使用数量
*/
private Long usageCount;
/**
- * The Usage time.
+ * 优惠使用时间
*/
private String usageTime;
/**
- * The Usage type.
+ * 优惠使用类型
*/
private StrategyType usageType;
diff --git a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/discountcard/UserRecordsParams.java b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/discountcard/UserRecordsParams.java
index ff5dcc9..78a95a0 100644
--- a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/discountcard/UserRecordsParams.java
+++ b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/model/discountcard/UserRecordsParams.java
@@ -14,7 +14,6 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
package cn.felord.payment.wechat.v3.model.discountcard;
@@ -30,21 +29,20 @@ import java.util.List;
*/
@Data
public class UserRecordsParams {
-
/**
- * The Out card code.
+ * 商户领卡号,商户在请求领卡预受理接口时传入的领卡请求号,同一个商户号下必须唯一,要求32个字符内,只能是数字、大小写字母_-|*
*/
private String outCardCode;
/**
- * The Card template id.
+ * 先享卡模板ID,唯一定义此资源的标识。创建模板后可获得
*/
private String cardTemplateId;
/**
- * The Objective completion records.
+ * 微信先享卡目标完成纪录
*/
private List