Skip to content

Support refund funds account in V3 requests#4001

Open
mzl2233 wants to merge 2 commits into
binarywang:developfrom
mzl2233:fix-refund-funds-account
Open

Support refund funds account in V3 requests#4001
mzl2233 wants to merge 2 commits into
binarywang:developfrom
mzl2233:fix-refund-funds-account

Conversation

@mzl2233
Copy link
Copy Markdown

@mzl2233 mzl2233 commented May 14, 2026

为普通商户版 WxPayRefundV3Request 补齐退款资金来源参数,和现有服务商版字段保持一致。变更包含 funds_account 以及 amount.from 出资账户明细,便于在退款申请时指定可用余额或未结算资金等来源。

测试:尝试运行 ./others/mvnw -pl weixin-java-pay -Dtest=WxPayRefundV3RequestTest test -DskipITs,但仓库缺少 org.apache.maven.wrapper.MavenWrapperMain 相关 wrapper jar,当前环境未能执行。

@binarywang
Copy link
Copy Markdown
Owner

你的提交是否涵盖了这两个我刚用ai分析出来的bug?
#4000
#3999

@binarywang binarywang requested a review from Copilot May 14, 2026 04:38
@binarywang binarywang added this to the 4.8.4 milestone May 14, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

该 PR 为微信支付普通商户版退款请求 WxPayRefundV3Request 补齐与服务商版一致的“退款资金来源/出资账户明细”参数,以支持在 V3 退款申请时指定退款来源资金账户。

Changes:

  • WxPayRefundV3Request 中新增 funds_account(退款资金来源)字段。
  • WxPayRefundV3Request.Amount 中新增 from(出资账户及金额明细)并引入对应的 From 明细结构。
  • 新增 WxPayRefundV3RequestTest,覆盖 funds_accountamount.from 的序列化断言。

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayRefundV3Request.java 普通商户退款请求新增 funds_accountamount.from 出资明细结构,以对齐/增强退款请求能力
weixin-java-pay/src/test/java/com/github/binarywang/wxpay/bean/request/WxPayRefundV3RequestTest.java 新增单测验证新增字段的 Gson 序列化字段名与结构

Comment on lines +87 to +104
/**
* <pre>
* 字段名:退款资金来源
* 变量名:funds_account
* 是否必填:否
* 类型:string[1, 32]
* 描述:
* 若传递此参数则使用对应的资金账户退款,否则默认使用未结算资金退款(仅对老资金流商户适用)
* 示例值:
* UNSETTLED : 未结算资金
* AVAILABLE : 可用余额
* UNAVAILABLE : 不可用余额
* OPERATION : 运营户
* BASIC : 基本账户(含可用余额和不可用余额)
* </pre>
*/
@SerializedName(value = "funds_account")
private String fundsAccount;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants