Repository navigation
feat(virtualpayment): ✨ 添加 postJSONBytesContext 函数并更新相关调用 解决body签名不一致问题 - #886
Merged
Merged
Conversation
- 新增批量任务、退款、广告金充值等相关错误码 - 添加下载订单、查询商家账户余额、查询广告金发放记录等接口 - 实现投诉处理相关接口,包括获取投诉列表、投诉详情、协商历史等 - 完善上传媒体文件及获取签名头部的功能
Contributor
There was a problem hiding this comment.
Pull request overview
本次 PR 针对 miniprogram/virtualpayment 模块中“请求 body 的签名内容与实际发送 body 不一致”问题进行修复:将原先由 util.PostJSONContext(ctx, ..., in) 在内部重新编码 JSON 的方式,替换为直接发送已用于签名的 jsonByte,从而保证签名与请求体字节级一致,解决虚拟支付部分接口(如退款)出现签名异常/pay_sig 为空的问题(关联 #884)。
Changes:
- 新增
postJSONBytesContext:以固定Content-Type直接 POST 已生成的 JSON bytes。 - 将 virtualpayment 相关接口的请求发送逻辑从
util.PostJSONContext(..., in)统一替换为postJSONBytesContext(..., jsonByte),确保签名与 body 一致。
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
将 ShowSplashAd 从 bool 改为 *bool,解决 omitempty 导致 false 值 被当作零值省略的问题。微信 API 默认值为 true(展示广告),传 false 无法关闭封面广告。 Closes silenceper#882
silenceper
approved these changes
Jun 3, 2026
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.
feat(virtualpayment): ✨ 添加 postJSONBytesContext 函数并更新相关调用 解决body签名不一致问题
fix #884
71be7e6
5904211