Support refund funds account in V3 requests#4001
Open
mzl2233 wants to merge 2 commits into
Open
Conversation
Owner
There was a problem hiding this comment.
Pull request overview
该 PR 为微信支付普通商户版退款请求 WxPayRefundV3Request 补齐与服务商版一致的“退款资金来源/出资账户明细”参数,以支持在 V3 退款申请时指定退款来源资金账户。
Changes:
- 在
WxPayRefundV3Request中新增funds_account(退款资金来源)字段。 - 在
WxPayRefundV3Request.Amount中新增from(出资账户及金额明细)并引入对应的From明细结构。 - 新增
WxPayRefundV3RequestTest,覆盖funds_account与amount.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_account 与 amount.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; |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
为普通商户版
WxPayRefundV3Request补齐退款资金来源参数,和现有服务商版字段保持一致。变更包含funds_account以及amount.from出资账户明细,便于在退款申请时指定可用余额或未结算资金等来源。测试:尝试运行
./others/mvnw -pl weixin-java-pay -Dtest=WxPayRefundV3RequestTest test -DskipITs,但仓库缺少org.apache.maven.wrapper.MavenWrapperMain相关 wrapper jar,当前环境未能执行。