From a8ee364bd45f8cc92db9e77a93bbdf575f0284e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=9D=8E=E9=B9=8F?= Date: Thu, 27 Jun 2024 12:57:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E4=BB=98=E9=80=9A=E5=90=88=E5=B9=B6?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5=E5=AE=9E=E7=8E=B0(#282)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/model/Transaction.java | 262 ++++------------- .../h5/model/CombinePayerInfo.java | 24 ++ .../h5/model/Transaction.java | 266 ++++-------------- .../jsapi/model/Transaction.java | 266 ++++-------------- .../model/SubOrderDetail.java | 234 +++++++++++++++ .../nativepay/model/CombinePayerInfo.java | 24 ++ .../nativepay/model/Transaction.java | 266 ++++-------------- 7 files changed, 484 insertions(+), 858 deletions(-) create mode 100644 service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/h5/model/CombinePayerInfo.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/model/SubOrderDetail.java create mode 100644 service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/nativepay/model/CombinePayerInfo.java diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/app/model/Transaction.java b/service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/app/model/Transaction.java index 8eda8e67..fa28aa76 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/app/model/Transaction.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/app/model/Transaction.java @@ -12,9 +12,7 @@ package com.wechat.pay.java.service.ecommercecombinepayments.app.model; import com.google.gson.annotations.SerializedName; -import com.wechat.pay.java.service.ecommercecombinepayments.model.PromotionDetail; -import com.wechat.pay.java.service.ecommercecombinepayments.model.TransactionAmount; -import com.wechat.pay.java.service.ecommercecombinepayments.model.TransactionPayer; +import com.wechat.pay.java.service.ecommercecombinepayments.model.SubOrderDetail; import java.util.List; @@ -22,251 +20,89 @@ /** */ public class Transaction { - /** amount */ - @SerializedName("amount") - private TransactionAmount amount; - /** spAppid */ - @SerializedName("sp_appid") - private String spAppid; + /** 合单商户appid 说明:合单发起方的appid */ + @SerializedName("combine_appid") + private String combineAppid; - /** subAppid */ - @SerializedName("sub_appid") - private String subAppid; + /** 合单商户号 说明:合单发起方商户号,服务商和电商模式下,传服务商商户号。*/ + @SerializedName("combine_mchid") + private String combineMchid; - /** spMchid */ - @SerializedName("sp_mchid") - private String spMchid; + /** combineOutTradeNo 说明:合单商户订单号 */ + @SerializedName("combine_out_trade_no") + private String combineOutTradeNo; - /** subMchid */ - @SerializedName("sub_mchid") - private String subMchid; + /** sceneInfo */ + @SerializedName("scene_info") + private SceneInfo sceneInfo; - /** attach */ - @SerializedName("attach") - private String attach; + /** sceneInfo */ + @SerializedName("sub_orders") + private List subOrders; - /** bankType */ - @SerializedName("bank_type") - private String bankType; + /** 支付者信息 */ + @SerializedName("combine_payer_info") + private CombinePayerInfo combinePayerInfo; - /** outTradeNo */ - @SerializedName("out_trade_no") - private String outTradeNo; - - /** payer */ - @SerializedName("payer") - private TransactionPayer payer; - - /** promotionDetail */ - @SerializedName("promotion_detail") - private List promotionDetail; - - /** successTime */ - @SerializedName("success_time") - private String successTime; - - /** tradeState */ - public enum TradeStateEnum { - @SerializedName("SUCCESS") - SUCCESS, - - @SerializedName("REFUND") - REFUND, - - @SerializedName("NOTPAY") - NOTPAY, - - @SerializedName("CLOSED") - CLOSED, - - @SerializedName("REVOKED") - REVOKED, - - @SerializedName("USERPAYING") - USERPAYING, - - @SerializedName("PAYERROR") - PAYERROR, - - @SerializedName("ACCEPT") - ACCEPT - } - - @SerializedName("trade_state") - private TradeStateEnum tradeState; - - /** tradeStateDesc */ - @SerializedName("trade_state_desc") - private String tradeStateDesc; - - /** tradeType */ - public enum TradeTypeEnum { - @SerializedName("JSAPI") - JSAPI, - - @SerializedName("NATIVE") - NATIVE, - - @SerializedName("APP") - APP, - - @SerializedName("MICROPAY") - MICROPAY, - - @SerializedName("MWEB") - MWEB, - - @SerializedName("FACEPAY") - FACEPAY - } - - @SerializedName("trade_type") - private TradeTypeEnum tradeType; - - /** transactionId */ - @SerializedName("transaction_id") - private String transactionId; - - public TransactionAmount getAmount() { - return amount; - } - - public void setAmount(TransactionAmount amount) { - this.amount = amount; - } - - public String getSpAppid() { - return spAppid; - } - - public void setSpAppid(String spAppid) { - this.spAppid = spAppid; - } - - public String getSubAppid() { - return subAppid; - } - - public void setSubAppid(String subAppid) { - this.subAppid = subAppid; - } - - public String getSpMchid() { - return spMchid; - } - - public void setSpMchid(String spMchid) { - this.spMchid = spMchid; - } - - public String getSubMchid() { - return subMchid; - } - - public void setSubMchid(String subMchid) { - this.subMchid = subMchid; - } - - public String getAttach() { - return attach; - } - - public void setAttach(String attach) { - this.attach = attach; - } - - public String getBankType() { - return bankType; - } - - public void setBankType(String bankType) { - this.bankType = bankType; - } - - public String getOutTradeNo() { - return outTradeNo; - } - - public void setOutTradeNo(String outTradeNo) { - this.outTradeNo = outTradeNo; - } - - public TransactionPayer getPayer() { - return payer; - } - - public void setPayer(TransactionPayer payer) { - this.payer = payer; - } - - public List getPromotionDetail() { - return promotionDetail; + public String getCombineAppid() { + return combineAppid; } - public void setPromotionDetail(List promotionDetail) { - this.promotionDetail = promotionDetail; + public void setCombineAppid(String combineAppid) { + this.combineAppid = combineAppid; } - public String getSuccessTime() { - return successTime; + public String getCombineMchid() { + return combineMchid; } - public void setSuccessTime(String successTime) { - this.successTime = successTime; + public void setCombineMchid(String combineMchid) { + this.combineMchid = combineMchid; } - public TradeStateEnum getTradeState() { - return tradeState; + public String getCombineOutTradeNo() { + return combineOutTradeNo; } - public void setTradeState(TradeStateEnum tradeState) { - this.tradeState = tradeState; + public void setCombineOutTradeNo(String combineOutTradeNo) { + this.combineOutTradeNo = combineOutTradeNo; } - public String getTradeStateDesc() { - return tradeStateDesc; + public SceneInfo getSceneInfo() { + return sceneInfo; } - public void setTradeStateDesc(String tradeStateDesc) { - this.tradeStateDesc = tradeStateDesc; + public void setSceneInfo(SceneInfo sceneInfo) { + this.sceneInfo = sceneInfo; } - public TradeTypeEnum getTradeType() { - return tradeType; + public List getSubOrders() { + return subOrders; } - public void setTradeType(TradeTypeEnum tradeType) { - this.tradeType = tradeType; + public void setSubOrders(List subOrders) { + this.subOrders = subOrders; } - public String getTransactionId() { - return transactionId; + public CombinePayerInfo getCombinePayerInfo() { + return combinePayerInfo; } - public void setTransactionId(String transactionId) { - this.transactionId = transactionId; + public void setCombinePayerInfo(CombinePayerInfo combinePayerInfo) { + this.combinePayerInfo = combinePayerInfo; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Transaction {\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" spAppid: ").append(toIndentedString(spAppid)).append("\n"); - sb.append(" subAppid: ").append(toIndentedString(subAppid)).append("\n"); - sb.append(" spMchid: ").append(toIndentedString(spMchid)).append("\n"); - sb.append(" subMchid: ").append(toIndentedString(subMchid)).append("\n"); - sb.append(" attach: ").append(toIndentedString(attach)).append("\n"); - sb.append(" bankType: ").append(toIndentedString(bankType)).append("\n"); - sb.append(" outTradeNo: ").append(toIndentedString(outTradeNo)).append("\n"); - sb.append(" payer: ").append(toIndentedString(payer)).append("\n"); - sb.append(" promotionDetail: ").append(toIndentedString(promotionDetail)).append("\n"); - sb.append(" successTime: ").append(toIndentedString(successTime)).append("\n"); - sb.append(" tradeState: ").append(toIndentedString(tradeState)).append("\n"); - sb.append(" tradeStateDesc: ").append(toIndentedString(tradeStateDesc)).append("\n"); - sb.append(" tradeType: ").append(toIndentedString(tradeType)).append("\n"); - sb.append(" transactionId: ").append(toIndentedString(transactionId)).append("\n"); + sb.append(" combineAppid: ").append(toIndentedString(combineAppid)).append("\n"); + sb.append(" combineMchid: ").append(toIndentedString(combineMchid)).append("\n"); + sb.append(" combineOutTradeNo: ").append(toIndentedString(combineOutTradeNo)).append("\n"); + sb.append(" sceneInfo: ").append(toIndentedString(sceneInfo)).append("\n"); + sb.append(" subOrders: ").append(toIndentedString(subOrders)).append("\n"); + sb.append(" combinePayerInfo: ").append(toIndentedString(combinePayerInfo)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/h5/model/CombinePayerInfo.java b/service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/h5/model/CombinePayerInfo.java new file mode 100644 index 00000000..5185e642 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/h5/model/CombinePayerInfo.java @@ -0,0 +1,24 @@ +package com.wechat.pay.java.service.ecommercecombinepayments.h5.model; + +import com.google.gson.annotations.SerializedName; + +public class CombinePayerInfo { + + @SerializedName("openid") + private String openid; + + public String getOpenid() { + return openid; + } + + public void setOpenid(String openid) { + this.openid = openid; + } + + @Override + public String toString() { + return "CombinePayerInfo{" + + "openid='" + openid + '\'' + + '}'; + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/h5/model/Transaction.java b/service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/h5/model/Transaction.java index 354ee935..53bba549 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/h5/model/Transaction.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/h5/model/Transaction.java @@ -1,8 +1,8 @@ // Copyright 2021 Tencent Inc. All rights reserved. // -// H5支付 +// APP支付 // -// H5支付API +// APP支付API // // API version: 1.2.3 @@ -12,9 +12,7 @@ package com.wechat.pay.java.service.ecommercecombinepayments.h5.model; import com.google.gson.annotations.SerializedName; -import com.wechat.pay.java.service.ecommercecombinepayments.model.PromotionDetail; -import com.wechat.pay.java.service.ecommercecombinepayments.model.TransactionAmount; -import com.wechat.pay.java.service.ecommercecombinepayments.model.TransactionPayer; +import com.wechat.pay.java.service.ecommercecombinepayments.model.SubOrderDetail; import java.util.List; @@ -22,251 +20,89 @@ /** */ public class Transaction { - /** amount */ - @SerializedName("amount") - private TransactionAmount amount; - /** spAppid */ - @SerializedName("sp_appid") - private String spAppid; + /** 合单商户appid 说明:合单发起方的appid */ + @SerializedName("combine_appid") + private String combineAppid; - /** subAppid */ - @SerializedName("sub_appid") - private String subAppid; + /** 合单商户号 说明:合单发起方商户号,服务商和电商模式下,传服务商商户号。*/ + @SerializedName("combine_mchid") + private String combineMchid; - /** spMchid */ - @SerializedName("sp_mchid") - private String spMchid; + /** combineOutTradeNo 说明:合单商户订单号 */ + @SerializedName("combine_out_trade_no") + private String combineOutTradeNo; - /** subMchid */ - @SerializedName("sub_mchid") - private String subMchid; + /** sceneInfo */ + @SerializedName("scene_info") + private SceneInfo sceneInfo; - /** attach */ - @SerializedName("attach") - private String attach; + /** sceneInfo */ + @SerializedName("sub_orders") + private List subOrders; - /** bankType */ - @SerializedName("bank_type") - private String bankType; + /** 支付者信息 */ + @SerializedName("combine_payer_info") + private CombinePayerInfo combinePayerInfo; - /** outTradeNo */ - @SerializedName("out_trade_no") - private String outTradeNo; - - /** payer */ - @SerializedName("payer") - private TransactionPayer payer; - - /** promotionDetail */ - @SerializedName("promotion_detail") - private List promotionDetail; - - /** successTime */ - @SerializedName("success_time") - private String successTime; - - /** tradeState */ - public enum TradeStateEnum { - @SerializedName("SUCCESS") - SUCCESS, - - @SerializedName("REFUND") - REFUND, - - @SerializedName("NOTPAY") - NOTPAY, - - @SerializedName("CLOSED") - CLOSED, - - @SerializedName("REVOKED") - REVOKED, - - @SerializedName("USERPAYING") - USERPAYING, - - @SerializedName("PAYERROR") - PAYERROR, - - @SerializedName("ACCEPT") - ACCEPT - } - - @SerializedName("trade_state") - private TradeStateEnum tradeState; - - /** tradeStateDesc */ - @SerializedName("trade_state_desc") - private String tradeStateDesc; - - /** tradeType */ - public enum TradeTypeEnum { - @SerializedName("JSAPI") - JSAPI, - - @SerializedName("NATIVE") - NATIVE, - - @SerializedName("APP") - APP, - - @SerializedName("MICROPAY") - MICROPAY, - - @SerializedName("MWEB") - MWEB, - - @SerializedName("FACEPAY") - FACEPAY - } - - @SerializedName("trade_type") - private TradeTypeEnum tradeType; - - /** transactionId */ - @SerializedName("transaction_id") - private String transactionId; - - public TransactionAmount getAmount() { - return amount; - } - - public void setAmount(TransactionAmount amount) { - this.amount = amount; - } - - public String getSpAppid() { - return spAppid; - } - - public void setSpAppid(String spAppid) { - this.spAppid = spAppid; - } - - public String getSubAppid() { - return subAppid; - } - - public void setSubAppid(String subAppid) { - this.subAppid = subAppid; - } - - public String getSpMchid() { - return spMchid; - } - - public void setSpMchid(String spMchid) { - this.spMchid = spMchid; - } - - public String getSubMchid() { - return subMchid; - } - - public void setSubMchid(String subMchid) { - this.subMchid = subMchid; - } - - public String getAttach() { - return attach; - } - - public void setAttach(String attach) { - this.attach = attach; - } - - public String getBankType() { - return bankType; - } - - public void setBankType(String bankType) { - this.bankType = bankType; - } - - public String getOutTradeNo() { - return outTradeNo; - } - - public void setOutTradeNo(String outTradeNo) { - this.outTradeNo = outTradeNo; - } - - public TransactionPayer getPayer() { - return payer; - } - - public void setPayer(TransactionPayer payer) { - this.payer = payer; - } - - public List getPromotionDetail() { - return promotionDetail; + public String getCombineAppid() { + return combineAppid; } - public void setPromotionDetail(List promotionDetail) { - this.promotionDetail = promotionDetail; + public void setCombineAppid(String combineAppid) { + this.combineAppid = combineAppid; } - public String getSuccessTime() { - return successTime; + public String getCombineMchid() { + return combineMchid; } - public void setSuccessTime(String successTime) { - this.successTime = successTime; + public void setCombineMchid(String combineMchid) { + this.combineMchid = combineMchid; } - public TradeStateEnum getTradeState() { - return tradeState; + public String getCombineOutTradeNo() { + return combineOutTradeNo; } - public void setTradeState(TradeStateEnum tradeState) { - this.tradeState = tradeState; + public void setCombineOutTradeNo(String combineOutTradeNo) { + this.combineOutTradeNo = combineOutTradeNo; } - public String getTradeStateDesc() { - return tradeStateDesc; + public SceneInfo getSceneInfo() { + return sceneInfo; } - public void setTradeStateDesc(String tradeStateDesc) { - this.tradeStateDesc = tradeStateDesc; + public void setSceneInfo(SceneInfo sceneInfo) { + this.sceneInfo = sceneInfo; } - public TradeTypeEnum getTradeType() { - return tradeType; + public List getSubOrders() { + return subOrders; } - public void setTradeType(TradeTypeEnum tradeType) { - this.tradeType = tradeType; + public void setSubOrders(List subOrders) { + this.subOrders = subOrders; } - public String getTransactionId() { - return transactionId; + public CombinePayerInfo getCombinePayerInfo() { + return combinePayerInfo; } - public void setTransactionId(String transactionId) { - this.transactionId = transactionId; + public void setCombinePayerInfo(CombinePayerInfo combinePayerInfo) { + this.combinePayerInfo = combinePayerInfo; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Transaction {\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" spAppid: ").append(toIndentedString(spAppid)).append("\n"); - sb.append(" subAppid: ").append(toIndentedString(subAppid)).append("\n"); - sb.append(" spMchid: ").append(toIndentedString(spMchid)).append("\n"); - sb.append(" subMchid: ").append(toIndentedString(subMchid)).append("\n"); - sb.append(" attach: ").append(toIndentedString(attach)).append("\n"); - sb.append(" bankType: ").append(toIndentedString(bankType)).append("\n"); - sb.append(" outTradeNo: ").append(toIndentedString(outTradeNo)).append("\n"); - sb.append(" payer: ").append(toIndentedString(payer)).append("\n"); - sb.append(" promotionDetail: ").append(toIndentedString(promotionDetail)).append("\n"); - sb.append(" successTime: ").append(toIndentedString(successTime)).append("\n"); - sb.append(" tradeState: ").append(toIndentedString(tradeState)).append("\n"); - sb.append(" tradeStateDesc: ").append(toIndentedString(tradeStateDesc)).append("\n"); - sb.append(" tradeType: ").append(toIndentedString(tradeType)).append("\n"); - sb.append(" transactionId: ").append(toIndentedString(transactionId)).append("\n"); + sb.append(" combineAppid: ").append(toIndentedString(combineAppid)).append("\n"); + sb.append(" combineMchid: ").append(toIndentedString(combineMchid)).append("\n"); + sb.append(" combineOutTradeNo: ").append(toIndentedString(combineOutTradeNo)).append("\n"); + sb.append(" sceneInfo: ").append(toIndentedString(sceneInfo)).append("\n"); + sb.append(" subOrders: ").append(toIndentedString(subOrders)).append("\n"); + sb.append(" combinePayerInfo: ").append(toIndentedString(combinePayerInfo)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/jsapi/model/Transaction.java b/service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/jsapi/model/Transaction.java index 49eea249..d2fff21f 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/jsapi/model/Transaction.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/jsapi/model/Transaction.java @@ -1,8 +1,8 @@ // Copyright 2021 Tencent Inc. All rights reserved. // -// JSAPI支付 +// APP支付 // -// JSAPI支付API +// APP支付API // // API version: 1.2.3 @@ -12,9 +12,7 @@ package com.wechat.pay.java.service.ecommercecombinepayments.jsapi.model; import com.google.gson.annotations.SerializedName; -import com.wechat.pay.java.service.ecommercecombinepayments.model.PromotionDetail; -import com.wechat.pay.java.service.ecommercecombinepayments.model.TransactionAmount; -import com.wechat.pay.java.service.ecommercecombinepayments.model.TransactionPayer; +import com.wechat.pay.java.service.ecommercecombinepayments.model.SubOrderDetail; import java.util.List; @@ -22,251 +20,89 @@ /** */ public class Transaction { - /** amount */ - @SerializedName("amount") - private TransactionAmount amount; - /** spAppid */ - @SerializedName("sp_appid") - private String spAppid; + /** 合单商户appid 说明:合单发起方的appid */ + @SerializedName("combine_appid") + private String combineAppid; - /** subAppid */ - @SerializedName("sub_appid") - private String subAppid; + /** 合单商户号 说明:合单发起方商户号,服务商和电商模式下,传服务商商户号。*/ + @SerializedName("combine_mchid") + private String combineMchid; - /** spMchid */ - @SerializedName("sp_mchid") - private String spMchid; + /** combineOutTradeNo 说明:合单商户订单号 */ + @SerializedName("combine_out_trade_no") + private String combineOutTradeNo; - /** subMchid */ - @SerializedName("sub_mchid") - private String subMchid; + /** sceneInfo */ + @SerializedName("scene_info") + private SceneInfo sceneInfo; - /** attach */ - @SerializedName("attach") - private String attach; + /** sceneInfo */ + @SerializedName("sub_orders") + private List subOrders; - /** bankType */ - @SerializedName("bank_type") - private String bankType; + /** 支付者信息 */ + @SerializedName("combine_payer_info") + private CombinePayerInfo combinePayerInfo; - /** outTradeNo */ - @SerializedName("out_trade_no") - private String outTradeNo; - - /** payer */ - @SerializedName("payer") - private TransactionPayer payer; - - /** promotionDetail */ - @SerializedName("promotion_detail") - private List promotionDetail; - - /** successTime */ - @SerializedName("success_time") - private String successTime; - - /** tradeState */ - public enum TradeStateEnum { - @SerializedName("SUCCESS") - SUCCESS, - - @SerializedName("REFUND") - REFUND, - - @SerializedName("NOTPAY") - NOTPAY, - - @SerializedName("CLOSED") - CLOSED, - - @SerializedName("REVOKED") - REVOKED, - - @SerializedName("USERPAYING") - USERPAYING, - - @SerializedName("PAYERROR") - PAYERROR, - - @SerializedName("ACCEPT") - ACCEPT - } - - @SerializedName("trade_state") - private TradeStateEnum tradeState; - - /** tradeStateDesc */ - @SerializedName("trade_state_desc") - private String tradeStateDesc; - - /** tradeType */ - public enum TradeTypeEnum { - @SerializedName("JSAPI") - JSAPI, - - @SerializedName("NATIVE") - NATIVE, - - @SerializedName("APP") - APP, - - @SerializedName("MICROPAY") - MICROPAY, - - @SerializedName("MWEB") - MWEB, - - @SerializedName("FACEPAY") - FACEPAY - } - - @SerializedName("trade_type") - private TradeTypeEnum tradeType; - - /** transactionId */ - @SerializedName("transaction_id") - private String transactionId; - - public TransactionAmount getAmount() { - return amount; - } - - public void setAmount(TransactionAmount amount) { - this.amount = amount; - } - - public String getSpAppid() { - return spAppid; - } - - public void setSpAppid(String spAppid) { - this.spAppid = spAppid; - } - - public String getSubAppid() { - return subAppid; - } - - public void setSubAppid(String subAppid) { - this.subAppid = subAppid; - } - - public String getSpMchid() { - return spMchid; - } - - public void setSpMchid(String spMchid) { - this.spMchid = spMchid; - } - - public String getSubMchid() { - return subMchid; - } - - public void setSubMchid(String subMchid) { - this.subMchid = subMchid; - } - - public String getAttach() { - return attach; - } - - public void setAttach(String attach) { - this.attach = attach; - } - - public String getBankType() { - return bankType; - } - - public void setBankType(String bankType) { - this.bankType = bankType; - } - - public String getOutTradeNo() { - return outTradeNo; - } - - public void setOutTradeNo(String outTradeNo) { - this.outTradeNo = outTradeNo; - } - - public TransactionPayer getPayer() { - return payer; - } - - public void setPayer(TransactionPayer payer) { - this.payer = payer; - } - - public List getPromotionDetail() { - return promotionDetail; + public String getCombineAppid() { + return combineAppid; } - public void setPromotionDetail(List promotionDetail) { - this.promotionDetail = promotionDetail; + public void setCombineAppid(String combineAppid) { + this.combineAppid = combineAppid; } - public String getSuccessTime() { - return successTime; + public String getCombineMchid() { + return combineMchid; } - public void setSuccessTime(String successTime) { - this.successTime = successTime; + public void setCombineMchid(String combineMchid) { + this.combineMchid = combineMchid; } - public TradeStateEnum getTradeState() { - return tradeState; + public String getCombineOutTradeNo() { + return combineOutTradeNo; } - public void setTradeState(TradeStateEnum tradeState) { - this.tradeState = tradeState; + public void setCombineOutTradeNo(String combineOutTradeNo) { + this.combineOutTradeNo = combineOutTradeNo; } - public String getTradeStateDesc() { - return tradeStateDesc; + public SceneInfo getSceneInfo() { + return sceneInfo; } - public void setTradeStateDesc(String tradeStateDesc) { - this.tradeStateDesc = tradeStateDesc; + public void setSceneInfo(SceneInfo sceneInfo) { + this.sceneInfo = sceneInfo; } - public TradeTypeEnum getTradeType() { - return tradeType; + public List getSubOrders() { + return subOrders; } - public void setTradeType(TradeTypeEnum tradeType) { - this.tradeType = tradeType; + public void setSubOrders(List subOrders) { + this.subOrders = subOrders; } - public String getTransactionId() { - return transactionId; + public CombinePayerInfo getCombinePayerInfo() { + return combinePayerInfo; } - public void setTransactionId(String transactionId) { - this.transactionId = transactionId; + public void setCombinePayerInfo(CombinePayerInfo combinePayerInfo) { + this.combinePayerInfo = combinePayerInfo; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Transaction {\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" spAppid: ").append(toIndentedString(spAppid)).append("\n"); - sb.append(" subAppid: ").append(toIndentedString(subAppid)).append("\n"); - sb.append(" spMchid: ").append(toIndentedString(spMchid)).append("\n"); - sb.append(" subMchid: ").append(toIndentedString(subMchid)).append("\n"); - sb.append(" attach: ").append(toIndentedString(attach)).append("\n"); - sb.append(" bankType: ").append(toIndentedString(bankType)).append("\n"); - sb.append(" outTradeNo: ").append(toIndentedString(outTradeNo)).append("\n"); - sb.append(" payer: ").append(toIndentedString(payer)).append("\n"); - sb.append(" promotionDetail: ").append(toIndentedString(promotionDetail)).append("\n"); - sb.append(" successTime: ").append(toIndentedString(successTime)).append("\n"); - sb.append(" tradeState: ").append(toIndentedString(tradeState)).append("\n"); - sb.append(" tradeStateDesc: ").append(toIndentedString(tradeStateDesc)).append("\n"); - sb.append(" tradeType: ").append(toIndentedString(tradeType)).append("\n"); - sb.append(" transactionId: ").append(toIndentedString(transactionId)).append("\n"); + sb.append(" combineAppid: ").append(toIndentedString(combineAppid)).append("\n"); + sb.append(" combineMchid: ").append(toIndentedString(combineMchid)).append("\n"); + sb.append(" combineOutTradeNo: ").append(toIndentedString(combineOutTradeNo)).append("\n"); + sb.append(" sceneInfo: ").append(toIndentedString(sceneInfo)).append("\n"); + sb.append(" subOrders: ").append(toIndentedString(subOrders)).append("\n"); + sb.append(" combinePayerInfo: ").append(toIndentedString(combinePayerInfo)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/model/SubOrderDetail.java b/service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/model/SubOrderDetail.java new file mode 100644 index 00000000..bff6a41c --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/model/SubOrderDetail.java @@ -0,0 +1,234 @@ +package com.wechat.pay.java.service.ecommercecombinepayments.model; + +import com.google.gson.annotations.SerializedName; + +import java.util.List; + +import static com.wechat.pay.java.core.util.StringUtil.toIndentedString; + +public class SubOrderDetail { + + /** 子商户号 说明:子单发起方商户号,必须与发起方appid有绑定关系。服务商和电商模式下,传服务商商户号。 */ + @SerializedName("mchid") + private String mchid; + + /** tradeType */ + public enum TradeTypeEnum { + @SerializedName("JSAPI") + JSAPI, + + @SerializedName("NATIVE") + NATIVE, + + @SerializedName("APP") + APP, + + @SerializedName("MICROPAY") + MICROPAY, + + @SerializedName("MWEB") + MWEB, + + @SerializedName("FACEPAY") + FACEPAY + } + + @SerializedName("trade_type") + private TradeTypeEnum tradeType; + + /** tradeState */ + public enum TradeStateEnum { + @SerializedName("SUCCESS") + SUCCESS, + + @SerializedName("REFUND") + REFUND, + + @SerializedName("NOTPAY") + NOTPAY, + + @SerializedName("CLOSED") + CLOSED, + + @SerializedName("REVOKED") + REVOKED, + + @SerializedName("USERPAYING") + USERPAYING, + + @SerializedName("PAYERROR") + PAYERROR, + + @SerializedName("ACCEPT") + ACCEPT + } + + @SerializedName("trade_state") + private TradeStateEnum tradeState; + + /** bankType */ + @SerializedName("bank_type") + private String bankType; + + /** attach */ + @SerializedName("attach") + private String attach; + + /** successTime */ + @SerializedName("success_time") + private String successTime; + + /** transactionId */ + @SerializedName("transaction_id") + private String transactionId; + + /** outTradeNo */ + @SerializedName("out_trade_no") + private String outTradeNo; + + /** subMchid */ + @SerializedName("sub_mchid") + private String subMchid; + + /** subAppid */ + @SerializedName("sub_appid") + private String subAppid; + + /** subOpenid */ + @SerializedName("sub_openid") + private String subOpenid; + + /** amount */ + @SerializedName("amount") + private TransactionAmount amount; + + /** promotionDetail */ + @SerializedName("promotion_detail") + private List promotionDetail; + + public String getMchid() { + return mchid; + } + + public void setMchid(String mchid) { + this.mchid = mchid; + } + + public TradeTypeEnum getTradeType() { + return tradeType; + } + + public void setTradeType(TradeTypeEnum tradeType) { + this.tradeType = tradeType; + } + + public TradeStateEnum getTradeState() { + return tradeState; + } + + public void setTradeState(TradeStateEnum tradeState) { + this.tradeState = tradeState; + } + + public String getBankType() { + return bankType; + } + + public void setBankType(String bankType) { + this.bankType = bankType; + } + + public String getAttach() { + return attach; + } + + public void setAttach(String attach) { + this.attach = attach; + } + + public String getSuccessTime() { + return successTime; + } + + public void setSuccessTime(String successTime) { + this.successTime = successTime; + } + + public String getTransactionId() { + return transactionId; + } + + public void setTransactionId(String transactionId) { + this.transactionId = transactionId; + } + + public String getOutTradeNo() { + return outTradeNo; + } + + public void setOutTradeNo(String outTradeNo) { + this.outTradeNo = outTradeNo; + } + + public String getSubMchid() { + return subMchid; + } + + public void setSubMchid(String subMchid) { + this.subMchid = subMchid; + } + + public String getSubAppid() { + return subAppid; + } + + public void setSubAppid(String subAppid) { + this.subAppid = subAppid; + } + + public String getSubOpenid() { + return subOpenid; + } + + public void setSubOpenid(String subOpenid) { + this.subOpenid = subOpenid; + } + + public TransactionAmount getAmount() { + return amount; + } + + public void setAmount(TransactionAmount amount) { + this.amount = amount; + } + + public List getPromotionDetail() { + return promotionDetail; + } + + public void setPromotionDetail(List promotionDetail) { + this.promotionDetail = promotionDetail; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SubOrderDetail {\n"); + sb.append(" mchid: ").append(toIndentedString(mchid)).append("\n"); + sb.append(" tradeType: ").append(toIndentedString(tradeType)).append("\n"); + sb.append(" tradeState: ").append(toIndentedString(tradeState)).append("\n"); + sb.append(" bankType: ").append(toIndentedString(bankType)).append("\n"); + sb.append(" attach: ").append(toIndentedString(attach)).append("\n"); + sb.append(" successTime: ").append(toIndentedString(successTime)).append("\n"); + sb.append(" transactionId: ").append(toIndentedString(transactionId)).append("\n"); + sb.append(" outTradeNo: ").append(toIndentedString(outTradeNo)).append("\n"); + sb.append(" subMchid: ").append(toIndentedString(subMchid)).append("\n"); + sb.append(" subAppid: ").append(toIndentedString(subAppid)).append("\n"); + sb.append(" subOpenid: ").append(toIndentedString(subOpenid)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" promotionDetail: ").append(toIndentedString(promotionDetail)).append("\n"); + sb.append("}"); + return sb.toString(); + } + +} diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/nativepay/model/CombinePayerInfo.java b/service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/nativepay/model/CombinePayerInfo.java new file mode 100644 index 00000000..62f7a6b8 --- /dev/null +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/nativepay/model/CombinePayerInfo.java @@ -0,0 +1,24 @@ +package com.wechat.pay.java.service.ecommercecombinepayments.nativepay.model; + +import com.google.gson.annotations.SerializedName; + +public class CombinePayerInfo { + + @SerializedName("openid") + private String openid; + + public String getOpenid() { + return openid; + } + + public void setOpenid(String openid) { + this.openid = openid; + } + + @Override + public String toString() { + return "CombinePayerInfo{" + + "openid='" + openid + '\'' + + '}'; + } +} diff --git a/service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/nativepay/model/Transaction.java b/service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/nativepay/model/Transaction.java index 0aba6b81..b0c9c49d 100644 --- a/service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/nativepay/model/Transaction.java +++ b/service/src/main/java/com/wechat/pay/java/service/ecommercecombinepayments/nativepay/model/Transaction.java @@ -1,8 +1,8 @@ // Copyright 2021 Tencent Inc. All rights reserved. // -// Native支付 +// APP支付 // -// Native支付API +// APP支付API // // API version: 1.2.3 @@ -12,9 +12,7 @@ package com.wechat.pay.java.service.ecommercecombinepayments.nativepay.model; import com.google.gson.annotations.SerializedName; -import com.wechat.pay.java.service.ecommercecombinepayments.model.PromotionDetail; -import com.wechat.pay.java.service.ecommercecombinepayments.model.TransactionAmount; -import com.wechat.pay.java.service.ecommercecombinepayments.model.TransactionPayer; +import com.wechat.pay.java.service.ecommercecombinepayments.model.SubOrderDetail; import java.util.List; @@ -22,251 +20,89 @@ /** */ public class Transaction { - /** amount */ - @SerializedName("amount") - private TransactionAmount amount; - /** spAppid */ - @SerializedName("sp_appid") - private String spAppid; + /** 合单商户appid 说明:合单发起方的appid */ + @SerializedName("combine_appid") + private String combineAppid; - /** subAppid */ - @SerializedName("sub_appid") - private String subAppid; + /** 合单商户号 说明:合单发起方商户号,服务商和电商模式下,传服务商商户号。*/ + @SerializedName("combine_mchid") + private String combineMchid; - /** spMchid */ - @SerializedName("sp_mchid") - private String spMchid; + /** combineOutTradeNo 说明:合单商户订单号 */ + @SerializedName("combine_out_trade_no") + private String combineOutTradeNo; - /** subMchid */ - @SerializedName("sub_mchid") - private String subMchid; + /** sceneInfo */ + @SerializedName("scene_info") + private SceneInfo sceneInfo; - /** attach */ - @SerializedName("attach") - private String attach; + /** sceneInfo */ + @SerializedName("sub_orders") + private List subOrders; - /** bankType */ - @SerializedName("bank_type") - private String bankType; + /** 支付者信息 */ + @SerializedName("combine_payer_info") + private CombinePayerInfo combinePayerInfo; - /** outTradeNo */ - @SerializedName("out_trade_no") - private String outTradeNo; - - /** payer */ - @SerializedName("payer") - private TransactionPayer payer; - - /** promotionDetail */ - @SerializedName("promotion_detail") - private List promotionDetail; - - /** successTime */ - @SerializedName("success_time") - private String successTime; - - /** tradeState */ - public enum TradeStateEnum { - @SerializedName("SUCCESS") - SUCCESS, - - @SerializedName("REFUND") - REFUND, - - @SerializedName("NOTPAY") - NOTPAY, - - @SerializedName("CLOSED") - CLOSED, - - @SerializedName("REVOKED") - REVOKED, - - @SerializedName("USERPAYING") - USERPAYING, - - @SerializedName("PAYERROR") - PAYERROR, - - @SerializedName("ACCEPT") - ACCEPT - } - - @SerializedName("trade_state") - private TradeStateEnum tradeState; - - /** tradeStateDesc */ - @SerializedName("trade_state_desc") - private String tradeStateDesc; - - /** tradeType */ - public enum TradeTypeEnum { - @SerializedName("JSAPI") - JSAPI, - - @SerializedName("NATIVE") - NATIVE, - - @SerializedName("APP") - APP, - - @SerializedName("MICROPAY") - MICROPAY, - - @SerializedName("MWEB") - MWEB, - - @SerializedName("FACEPAY") - FACEPAY - } - - @SerializedName("trade_type") - private TradeTypeEnum tradeType; - - /** transactionId */ - @SerializedName("transaction_id") - private String transactionId; - - public TransactionAmount getAmount() { - return amount; - } - - public void setAmount(TransactionAmount amount) { - this.amount = amount; - } - - public String getSpAppid() { - return spAppid; - } - - public void setSpAppid(String spAppid) { - this.spAppid = spAppid; - } - - public String getSubAppid() { - return subAppid; - } - - public void setSubAppid(String subAppid) { - this.subAppid = subAppid; - } - - public String getSpMchid() { - return spMchid; - } - - public void setSpMchid(String spMchid) { - this.spMchid = spMchid; - } - - public String getSubMchid() { - return subMchid; - } - - public void setSubMchid(String subMchid) { - this.subMchid = subMchid; - } - - public String getAttach() { - return attach; - } - - public void setAttach(String attach) { - this.attach = attach; - } - - public String getBankType() { - return bankType; - } - - public void setBankType(String bankType) { - this.bankType = bankType; - } - - public String getOutTradeNo() { - return outTradeNo; - } - - public void setOutTradeNo(String outTradeNo) { - this.outTradeNo = outTradeNo; - } - - public TransactionPayer getPayer() { - return payer; - } - - public void setPayer(TransactionPayer payer) { - this.payer = payer; - } - - public List getPromotionDetail() { - return promotionDetail; + public String getCombineAppid() { + return combineAppid; } - public void setPromotionDetail(List promotionDetail) { - this.promotionDetail = promotionDetail; + public void setCombineAppid(String combineAppid) { + this.combineAppid = combineAppid; } - public String getSuccessTime() { - return successTime; + public String getCombineMchid() { + return combineMchid; } - public void setSuccessTime(String successTime) { - this.successTime = successTime; + public void setCombineMchid(String combineMchid) { + this.combineMchid = combineMchid; } - public TradeStateEnum getTradeState() { - return tradeState; + public String getCombineOutTradeNo() { + return combineOutTradeNo; } - public void setTradeState(TradeStateEnum tradeState) { - this.tradeState = tradeState; + public void setCombineOutTradeNo(String combineOutTradeNo) { + this.combineOutTradeNo = combineOutTradeNo; } - public String getTradeStateDesc() { - return tradeStateDesc; + public SceneInfo getSceneInfo() { + return sceneInfo; } - public void setTradeStateDesc(String tradeStateDesc) { - this.tradeStateDesc = tradeStateDesc; + public void setSceneInfo(SceneInfo sceneInfo) { + this.sceneInfo = sceneInfo; } - public TradeTypeEnum getTradeType() { - return tradeType; + public List getSubOrders() { + return subOrders; } - public void setTradeType(TradeTypeEnum tradeType) { - this.tradeType = tradeType; + public void setSubOrders(List subOrders) { + this.subOrders = subOrders; } - public String getTransactionId() { - return transactionId; + public CombinePayerInfo getCombinePayerInfo() { + return combinePayerInfo; } - public void setTransactionId(String transactionId) { - this.transactionId = transactionId; + public void setCombinePayerInfo(CombinePayerInfo combinePayerInfo) { + this.combinePayerInfo = combinePayerInfo; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Transaction {\n"); - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" spAppid: ").append(toIndentedString(spAppid)).append("\n"); - sb.append(" subAppid: ").append(toIndentedString(subAppid)).append("\n"); - sb.append(" spMchid: ").append(toIndentedString(spMchid)).append("\n"); - sb.append(" subMchid: ").append(toIndentedString(subMchid)).append("\n"); - sb.append(" attach: ").append(toIndentedString(attach)).append("\n"); - sb.append(" bankType: ").append(toIndentedString(bankType)).append("\n"); - sb.append(" outTradeNo: ").append(toIndentedString(outTradeNo)).append("\n"); - sb.append(" payer: ").append(toIndentedString(payer)).append("\n"); - sb.append(" promotionDetail: ").append(toIndentedString(promotionDetail)).append("\n"); - sb.append(" successTime: ").append(toIndentedString(successTime)).append("\n"); - sb.append(" tradeState: ").append(toIndentedString(tradeState)).append("\n"); - sb.append(" tradeStateDesc: ").append(toIndentedString(tradeStateDesc)).append("\n"); - sb.append(" tradeType: ").append(toIndentedString(tradeType)).append("\n"); - sb.append(" transactionId: ").append(toIndentedString(transactionId)).append("\n"); + sb.append(" combineAppid: ").append(toIndentedString(combineAppid)).append("\n"); + sb.append(" combineMchid: ").append(toIndentedString(combineMchid)).append("\n"); + sb.append(" combineOutTradeNo: ").append(toIndentedString(combineOutTradeNo)).append("\n"); + sb.append(" sceneInfo: ").append(toIndentedString(sceneInfo)).append("\n"); + sb.append(" subOrders: ").append(toIndentedString(subOrders)).append("\n"); + sb.append(" combinePayerInfo: ").append(toIndentedString(combinePayerInfo)).append("\n"); sb.append("}"); return sb.toString(); }