-
-
Notifications
You must be signed in to change notification settings - Fork 9k
Implement Business Operations Merchant Transfer API (Document 4012711988) #3689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
+720
−0
Draft
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
...java/com/github/binarywang/wxpay/bean/transfer/BusinessOperationTransferQueryRequest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package com.github.binarywang.wxpay.bean.transfer; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* 运营工具-商家转账查询请求参数 | ||
* | ||
* @author WxJava Team | ||
* @see <a href="https://pay.weixin.qq.com/doc/v3/merchant/4012711988">运营工具-商家转账API</a> | ||
*/ | ||
@Data | ||
@Builder(builderMethodName = "newBuilder") | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class BusinessOperationTransferQueryRequest implements Serializable { | ||
private static final long serialVersionUID = 1L; | ||
|
||
/** | ||
* 商户系统内部的商家单号 | ||
* 与transfer_bill_no二选一 | ||
*/ | ||
@SerializedName("out_bill_no") | ||
private String outBillNo; | ||
|
||
/** | ||
* 微信转账单号 | ||
* 与out_bill_no二选一 | ||
*/ | ||
@SerializedName("transfer_bill_no") | ||
private String transferBillNo; | ||
|
||
/** | ||
* 直连商户的appid | ||
* 可选 | ||
*/ | ||
@SerializedName("appid") | ||
private String appid; | ||
} |
101 changes: 101 additions & 0 deletions
.../java/com/github/binarywang/wxpay/bean/transfer/BusinessOperationTransferQueryResult.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
package com.github.binarywang.wxpay.bean.transfer; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* 运营工具-商家转账查询结果 | ||
* | ||
* @author WxJava Team | ||
* @see <a href="https://pay.weixin.qq.com/doc/v3/merchant/4012711988">运营工具-商家转账API</a> | ||
*/ | ||
@Data | ||
@NoArgsConstructor | ||
public class BusinessOperationTransferQueryResult implements Serializable { | ||
private static final long serialVersionUID = 1L; | ||
|
||
/** | ||
* 直连商户的appid | ||
*/ | ||
@SerializedName("appid") | ||
private String appid; | ||
|
||
/** | ||
* 商户系统内部的商家单号 | ||
*/ | ||
@SerializedName("out_bill_no") | ||
private String outBillNo; | ||
|
||
/** | ||
* 微信转账单号 | ||
*/ | ||
@SerializedName("transfer_bill_no") | ||
private String transferBillNo; | ||
|
||
/** | ||
* 运营工具转账场景ID | ||
*/ | ||
@SerializedName("operation_scene_id") | ||
private String operationSceneId; | ||
|
||
/** | ||
* 用户在直连商户应用下的用户标示 | ||
*/ | ||
@SerializedName("openid") | ||
private String openid; | ||
|
||
/** | ||
* 收款用户姓名 | ||
* 已脱敏 | ||
*/ | ||
@SerializedName("user_name") | ||
private String userName; | ||
|
||
/** | ||
* 转账金额 | ||
* 单位为"分" | ||
*/ | ||
@SerializedName("transfer_amount") | ||
private Integer transferAmount; | ||
|
||
/** | ||
* 转账备注 | ||
*/ | ||
@SerializedName("transfer_remark") | ||
private String transferRemark; | ||
|
||
/** | ||
* 转账状态 | ||
* WAIT_PAY:等待确认 | ||
* PROCESSING:转账中 | ||
* SUCCESS:转账成功 | ||
* FAIL:转账失败 | ||
* REFUND:已退款 | ||
*/ | ||
@SerializedName("transfer_state") | ||
private String transferState; | ||
|
||
/** | ||
* 发起转账的时间 | ||
* 遵循rfc3339标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE | ||
*/ | ||
@SerializedName("create_time") | ||
private String createTime; | ||
|
||
/** | ||
* 转账更新时间 | ||
* 遵循rfc3339标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE | ||
*/ | ||
@SerializedName("update_time") | ||
private String updateTime; | ||
|
||
/** | ||
* 失败原因 | ||
* 当transfer_state为FAIL时返回 | ||
*/ | ||
@SerializedName("fail_reason") | ||
private String failReason; | ||
} |
89 changes: 89 additions & 0 deletions
...main/java/com/github/binarywang/wxpay/bean/transfer/BusinessOperationTransferRequest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
package com.github.binarywang.wxpay.bean.transfer; | ||
|
||
import com.github.binarywang.wxpay.v3.SpecEncrypt; | ||
import com.google.gson.annotations.SerializedName; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* 运营工具-商家转账请求参数 | ||
* | ||
* @author WxJava Team | ||
* @see <a href="https://pay.weixin.qq.com/doc/v3/merchant/4012711988">运营工具-商家转账API</a> | ||
*/ | ||
@Data | ||
@Builder(builderMethodName = "newBuilder") | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class BusinessOperationTransferRequest implements Serializable { | ||
private static final long serialVersionUID = 1L; | ||
|
||
/** | ||
* 直连商户的appid | ||
* 必须 | ||
*/ | ||
@SerializedName("appid") | ||
private String appid; | ||
|
||
/** | ||
* 商户系统内部的商家单号 | ||
* 必须,要求此参数只能由数字、大小写字母组成,在商户系统内部唯一 | ||
*/ | ||
@SerializedName("out_bill_no") | ||
private String outBillNo; | ||
|
||
/** | ||
* 运营工具转账场景ID | ||
* 必须,用于标识运营工具转账的具体业务场景 | ||
*/ | ||
@SerializedName("operation_scene_id") | ||
private String operationSceneId; | ||
|
||
/** | ||
* 用户在直连商户应用下的用户标示 | ||
* 必须 | ||
*/ | ||
@SerializedName("openid") | ||
private String openid; | ||
|
||
/** | ||
* 收款用户姓名 | ||
* 可选,传入则校验收款用户姓名 | ||
* 使用RSA加密,使用OAEP填充方式 | ||
*/ | ||
@SpecEncrypt | ||
@SerializedName("user_name") | ||
private String userName; | ||
|
||
/** | ||
* 转账金额 | ||
* 必须,单位为"分" | ||
*/ | ||
@SerializedName("transfer_amount") | ||
private Integer transferAmount; | ||
|
||
/** | ||
* 转账备注 | ||
* 必须,会在转账成功消息和转账详情页向用户展示 | ||
*/ | ||
@SerializedName("transfer_remark") | ||
private String transferRemark; | ||
|
||
/** | ||
* 用户收款感知 | ||
* 可选,用于在转账成功消息中向用户展示特定内容 | ||
*/ | ||
@SerializedName("user_recv_perception") | ||
private String userRecvPerception; | ||
|
||
/** | ||
* 异步接收微信支付转账结果通知的回调地址 | ||
* 可选,通知URL必须为外网可以正常访问的地址,不能携带查询参数 | ||
*/ | ||
@SerializedName("notify_url") | ||
private String notifyUrl; | ||
} |
64 changes: 64 additions & 0 deletions
.../main/java/com/github/binarywang/wxpay/bean/transfer/BusinessOperationTransferResult.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
package com.github.binarywang.wxpay.bean.transfer; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* 运营工具-商家转账结果 | ||
* | ||
* @author WxJava Team | ||
* @see <a href="https://pay.weixin.qq.com/doc/v3/merchant/4012711988">运营工具-商家转账API</a> | ||
*/ | ||
@Data | ||
@NoArgsConstructor | ||
public class BusinessOperationTransferResult implements Serializable { | ||
private static final long serialVersionUID = 1L; | ||
|
||
/** | ||
* 商户系统内部的商家单号 | ||
*/ | ||
@SerializedName("out_bill_no") | ||
private String outBillNo; | ||
|
||
/** | ||
* 微信转账单号 | ||
* 微信商家转账系统返回的唯一标识 | ||
*/ | ||
@SerializedName("transfer_bill_no") | ||
private String transferBillNo; | ||
|
||
/** | ||
* 转账状态 | ||
* WAIT_PAY:等待确认 | ||
* PROCESSING:转账中 | ||
* SUCCESS:转账成功 | ||
* FAIL:转账失败 | ||
* REFUND:已退款 | ||
*/ | ||
@SerializedName("transfer_state") | ||
private String transferState; | ||
|
||
/** | ||
* 发起转账的时间 | ||
* 遵循rfc3339标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE | ||
*/ | ||
@SerializedName("create_time") | ||
private String createTime; | ||
|
||
/** | ||
* 转账更新时间 | ||
* 遵循rfc3339标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE | ||
*/ | ||
@SerializedName("update_time") | ||
private String updateTime; | ||
|
||
/** | ||
* 失败原因 | ||
* 当transfer_state为FAIL时返回 | ||
*/ | ||
@SerializedName("fail_reason") | ||
private String failReason; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.