微信支付:默认使用公钥模式,全部v3接口添加Wechatpay-Serial请求头#3976
Open
buaazyl wants to merge 3 commits intobinarywang:developfrom
Open
微信支付:默认使用公钥模式,全部v3接口添加Wechatpay-Serial请求头#3976buaazyl wants to merge 3 commits intobinarywang:developfrom
buaazyl wants to merge 3 commits intobinarywang:developfrom
Conversation
Contributor
buaazyl
commented
May 4, 2026
- 默认使用公钥模式
- 全部v3接口添加Wechatpay-Serial请求头
- 调整apiV3秘钥命名
- 更新了readme中v2、v3新版文档地址
1.调整apiV3秘钥命名 2.更新了readme中v2、v3新版文档地址
🤖 Augment PR SummarySummary: This PR updates WxJava WeChat Pay (v3) defaults and configuration naming to better align with the newer public-key flow and request header requirements. Changes:
Technical Notes: Spring Boot relaxed binding will now expect 🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Pull request overview
该 PR 主要调整微信支付 V3 的默认配置行为,并同步更新 Spring Boot 多商户示例文档,目标是推动默认走公钥模式并统一携带 Wechatpay-Serial 请求头。
Changes:
- 将支付配置中的
strictlyNeedWechatPaySerial、fullPublicKeyModel默认值从false改为true - 将 Spring Boot Starter / Multi Starter 的
apiv3Key属性命名调整为apiV3Key - 更新多商户 README 中的 properties 示例和微信支付文档链接
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/WxPayConfig.java |
调整核心支付配置默认值 |
spring-boot-starters/wx-java-pay-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/pay/properties/WxPayProperties.java |
调整单商户 Spring Boot 配置属性名与默认值 |
spring-boot-starters/wx-java-pay-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/pay/config/WxPayAutoConfiguration.java |
适配新的 apiV3Key getter |
spring-boot-starters/wx-java-pay-multi-spring-boot-starter/src/test/java/com/binarywang/spring/starter/wxjava/pay/WxPayMultiServicesTest.java |
更新测试断言使用新的 getter |
spring-boot-starters/wx-java-pay-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/pay/service/WxPayMultiServicesImpl.java |
多商户服务构建逻辑改为读取 apiV3Key |
spring-boot-starters/wx-java-pay-multi-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/pay/properties/WxPaySingleProperties.java |
调整多商户单配置属性名与默认值 |
spring-boot-starters/wx-java-pay-multi-spring-boot-starter/README.md |
更新 properties 示例键名和官方文档链接 |
Comment on lines
277
to
+280
| /** | ||
| * 是否完全使用公钥模式(用以微信从平台证书到公钥的灰度切换),默认不使用 | ||
| * 是否完全使用公钥模式(用以微信从平台证书到公钥的灰度切换),默认使用 | ||
| */ | ||
| private boolean fullPublicKeyModel = false; | ||
| private boolean fullPublicKeyModel = true; |
Comment on lines
119
to
+122
| /** | ||
| * 是否完全使用公钥模式(用以微信从平台证书到公钥的灰度切换),默认不使用 | ||
| * 是否完全使用公钥模式(用以微信从平台证书到公钥的灰度切换),默认使用 | ||
| */ | ||
| private boolean fullPublicKeyModel = false; | ||
| private boolean fullPublicKeyModel = true; |
Comment on lines
120
to
+123
| /** | ||
| * 是否完全使用公钥模式(用以微信从平台证书到公钥的灰度切换),默认不使用. | ||
| * 是否完全使用公钥模式(用以微信从平台证书到公钥的灰度切换),默认使用. | ||
| */ | ||
| private boolean fullPublicKeyModel = false; | ||
| private boolean fullPublicKeyModel = true; |
Comment on lines
57
to
+60
| /** | ||
| * apiV3秘钥 | ||
| */ | ||
| private String apiv3Key; | ||
| private String apiV3Key; |
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.