fix: 修复请求仿真测试系统的验签密钥ContentType#3745
Merged
binarywang merged 2 commits intobinarywang:developfrom Oct 28, 2025
AcceptMediocrity:develop
Merged
fix: 修复请求仿真测试系统的验签密钥ContentType#3745binarywang merged 2 commits intobinarywang:developfrom AcceptMediocrity:develop
binarywang merged 2 commits intobinarywang:developfrom
AcceptMediocrity:develop
Conversation
There was a problem hiding this comment.
Pull Request Overview
此 PR 修复了请求微信仿真测试系统时验签密钥接口的 Content-Type 问题。主要变更是在多个 HTTP 实现类中添加了支持自定义 MIME 类型的 post 方法重载版本,并在获取沙箱签名密钥时使用正确的 application/xml Content-Type。
主要变更
- 在
WxPayService接口中新增了带mimeType参数的post方法签名 - 在三个 HTTP 客户端实现类中实现了该方法
- 修复了
getSandboxSignKey()方法,使用正确的 Content-Type 调用沙箱签名密钥接口
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| WxPayService.java | 在接口中新增了支持自定义 MIME 类型的 post 方法签名,并补充了文档说明 |
| BaseWxPayServiceImpl.java | 在 getSandboxSignKey 方法中使用新的 post 重载版本,传入正确的 XML Content-Type |
| WxPayServiceJoddHttpImpl.java | 实现了支持自定义 MIME 类型的 post 方法和对应的 HTTP 请求构建逻辑 |
| WxPayServiceHttpComponentsImpl.java | 实现了支持自定义 MIME 类型的 post 方法和对应的 HTTP 请求构建逻辑 |
| WxPayServiceApacheHttpImpl.java | 实现了支持自定义 MIME 类型的 post 方法和对应的 HTTP 请求构建逻辑 |
...y/src/main/java/com/github/binarywang/wxpay/service/impl/WxPayServiceHttpComponentsImpl.java
Outdated
Show resolved
Hide resolved
…ice/impl/WxPayServiceHttpComponentsImpl.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.