Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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
Copilot wants to merge 3 commits into develop
base: develop
Choose a base branch
Loading
from copilot/fix-3507
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
View file Open in desktop
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;
}
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;
}
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;
}
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,29 @@ public static class TransformSceneId {
public static final String CASH_MARKETING = "1001";
}

/**
* 【运营工具转账场景ID】 运营工具专用转账场景,用于商户日常运营活动
*
* @see <a href="https://pay.weixin.qq.com/doc/v3/merchant/4012711988">运营工具-商家转账API</a>
*/
@UtilityClass
public static class OperationSceneId {
/**
* 运营工具现金营销
*/
public static final String OPERATION_CASH_MARKETING = "2001";

/**
* 运营工具佣金报酬
*/
public static final String OPERATION_COMMISSION = "2002";

/**
* 运营工具推广奖励
*/
public static final String OPERATION_PROMOTION = "2003";
}

/**
* 用户收款感知
*
Expand Down
Loading

AltStyle によって変換されたページ (->オリジナル) /