微信支付starter支持配置退款结果回调URL#3838
Merged
binarywang merged 4 commits intobinarywang:developfrom Jan 9, 2026
Hidden character warning
The head ref may contain hidden characters: "\u4f18\u5316\u652f\u4ed8starter"
Merged
Conversation
miniapp默认使用HttpClient 5.x
🤖 Augment PR SummarySummary: This PR adds support for configuring a dedicated refund-result callback URL for WxPay starters. Changes:
Technical Notes: Request-level 🤖 Was this summary useful? React with 👍 or 👎 |
...in-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java
Show resolved
Hide resolved
...arter/src/main/java/com/binarywang/spring/starter/wxjava/pay/properties/WxPayProperties.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
本 PR 为微信支付 starter 添加了退款结果回调 URL 的配置支持,允许开发者在配置文件中统一配置退款通知地址,而不需要在每次调用退款接口时手动设置。
主要变更包括:
- 在核心配置和请求对象中添加了
refundNotifyUrl字段 - 在退款方法中实现了自动填充逻辑:当请求中未设置时,自动使用配置的 URL
- Spring Boot starter 支持通过配置属性设置退款回调 URL
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/WxPayConfig.java | 添加 refundNotifyUrl 配置字段 |
| weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java | 在 refundV3 和 partnerRefundV3 方法中实现自动填充退款回调 URL |
| weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayRefundRequest.java | 在 V2 退款请求的 checkAndSign 方法中自动填充退款回调 URL |
| spring-boot-starters/wx-java-pay-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/pay/properties/WxPayProperties.java | 添加 refundNotifyUrl 配置属性 |
| spring-boot-starters/wx-java-pay-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/pay/config/WxPayAutoConfiguration.java | 将 refundNotifyUrl 属性映射到 WxPayConfig |
| README.md | 更新 HTTP 客户端文档(与主题无关) |
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/WxPayConfig.java
Outdated
Show resolved
Hide resolved
...er/src/main/java/com/binarywang/spring/starter/wxjava/pay/config/WxPayAutoConfiguration.java
Show resolved
Hide resolved
…ig/WxPayConfig.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Owner
|
auggie review |
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.
No description provided.