Skip to content

fix: 保留小程序纯签约 version 字段兼容性#4074

Draft
binarywang wants to merge 1 commit into
developfrom
agent/preserve-ma-entrust-version
Draft

fix: 保留小程序纯签约 version 字段兼容性#4074
binarywang wants to merge 1 commit into
developfrom
agent/preserve-ma-entrust-version

Conversation

@binarywang

Copy link
Copy Markdown
Owner

变更内容

  • 保留 WxMaEntrustRequest.version 的 getter/setter/Builder 兼容性,但标记为 Deprecated。
  • 从小程序纯签约的 JSON、普通 XML 和快速 XML 输出中排除该字段。
  • 在签名计算中显式忽略该字段。

原因

微信小程序纯签约接口不支持 version;该字段出现在请求参数中会导致签名校验失败。

验证

  • 新增 WxMaEntrustRequestTest,覆盖显式设置 version("1.0") 后的 JSON、两种 XML 序列化和签名行为。
  • mvn -pl weixin-java-pay -DskipTests compile test-compile
  • 使用 TestNG 直接运行 WxMaEntrustRequestTest:1 passed, 0 failed。

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.

1 participant