Skip to content

Commit

Permalink
收付通合并支付相关接口对接实现(wechatpay-apiv3#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
liulipeng committed Jun 27, 2024
1 parent f9e71b4 commit a8ee364
Show file tree
Hide file tree
Showing 7 changed files with 484 additions and 858 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,261 +12,97 @@
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;

import static com.wechat.pay.java.core.util.StringUtil.toIndentedString;

/** */
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<SubOrderDetail> 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> 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<PromotionDetail> getPromotionDetail() {
return promotionDetail;
public String getCombineAppid() {
return combineAppid;
}

public void setPromotionDetail(List<PromotionDetail> 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<SubOrderDetail> getSubOrders() {
return subOrders;
}

public void setTradeType(TradeTypeEnum tradeType) {
this.tradeType = tradeType;
public void setSubOrders(List<SubOrderDetail> 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();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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 + '\'' +
'}';
}
}
Loading

0 comments on commit a8ee364

Please sign in to comment.