Skip to content

Commit

Permalink
🎨 #2653 【微信支付】支付分相关接口增加服务商支持
Browse files Browse the repository at this point in the history
  • Loading branch information
hallkk authored May 22, 2022
1 parent 4de09fa commit 529f786
Show file tree
Hide file tree
Showing 9 changed files with 724 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.github.binarywang.wxpay.bean.ecommerce;

import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

Expand All @@ -17,7 +19,9 @@
* @author cloudX
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PartnerTransactionsRequest implements Serializable {
private static final long serialVersionUID = -1550405819444680465L;

Expand Down Expand Up @@ -277,6 +281,7 @@ public static class Discount implements Serializable {

@Data
@NoArgsConstructor
@AllArgsConstructor
public static class Amount implements Serializable {
private static final long serialVersionUID = -4967636398225864273L;

Expand Down Expand Up @@ -312,6 +317,7 @@ public static class Amount implements Serializable {

@Data
@NoArgsConstructor
@AllArgsConstructor
public static class Payer implements Serializable {
private static final long serialVersionUID = -3946401119476159971L;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.github.binarywang.wxpay.bean.ecommerce;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

Expand All @@ -10,7 +12,9 @@
* 文档地址: https://wechatpay-api.gitbook.io/wechatpay-api-v3/qian-ming-zhi-nan-1/qian-ming-yan-zheng
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SignatureHeader implements Serializable {
private static final long serialVersionUID = -6958015499416059949L;
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.github.binarywang.wxpay.bean.notify;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

Expand All @@ -10,7 +12,9 @@
* 文档地址: https://pay.weixin.qq.com/wiki/doc/apiv3/wechatpay/wechatpay4_1.shtml
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SignatureHeader implements Serializable {
private static final long serialVersionUID = -1L;
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package com.github.binarywang.wxpay.bean.payscore;

import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;
import me.chanjar.weixin.common.util.json.WxGsonBuilder;

/**
* @author hallkk
* @date 2022/05/18
*/
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class WxPartnerPayScoreRequest extends WxPayScoreRequest {
private static final long serialVersionUID = 6269843192878112955L;

public String toJson() {
return WxGsonBuilder.create().toJson(this);
}

@SerializedName("sub_appid")
private String subAppid;

@SerializedName("sub_mchid")
private String subMchid;

@SerializedName("out_apply_no")
private String outApplyNo;

@SerializedName("result_notify_url")
private String resultNotifyUrl;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package com.github.binarywang.wxpay.bean.payscore;

import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.NoArgsConstructor;
import me.chanjar.weixin.common.util.json.WxGsonBuilder;

/**
* @author hallkk
* @date 2022/05/18
*/
@Data
@NoArgsConstructor
public class WxPartnerPayScoreResult extends WxPayScoreResult {
private static final long serialVersionUID = 718267574622164410L;

public static WxPartnerPayScoreResult fromJson(String json) {
return WxGsonBuilder.create().fromJson(json, WxPartnerPayScoreResult.class);
}

@SerializedName("sub_appid")
private String subAppid;

@SerializedName("sub_mchid")
private String subMchid;

@SerializedName("sub_openid")
private String subOpenId;

@SerializedName("out_apply_no")
private String outApplyNo;

@SerializedName("result_notify_url")
private String resultNotifyUrl;

@SerializedName("apply_state")
private String applyState;

@SerializedName("reject_reason")
private String rejectReason;

}
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;
import me.chanjar.weixin.common.util.json.WxGsonBuilder;

/**
* @author doger.wang
* @date 2020/5/12 16:36
*/
@Data
@Builder
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
Expand Down Expand Up @@ -82,6 +83,6 @@ public String toJson() {
@SerializedName("detail")
private Detail detail;
@SerializedName("authorization_code")
private String authorizationCode;
private String authorizationCode;

}
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,23 @@ public static WxPayScoreResult fromJson(String json) {
@SerializedName("payScoreSignInfo")
private Map<String, String> payScoreSignInfo;

@SerializedName("openid")
private String openId;

@SerializedName("apply_permissions_token")
private String applyPermissionsToken;
private String applyPermissionsToken;

@SerializedName("authorization_code")
private String authorizationCode;
private String authorizationCode;

@SerializedName("authorization_state")
private String authorizationState;
private String authorizationState;

@SerializedName("cancel_authorization_time")
private String cancelAuthorizationTime;
private String cancelAuthorizationTime;

@SerializedName("authorization_success_time")
private String authorizationSuccessTime;
private String authorizationSuccessTime;

@SerializedName("openid")
private String openid;
Expand Down
Loading

0 comments on commit 529f786

Please sign in to comment.