docs: clarify that micropay sign/appid/nonceStr are auto-filled by the SDK - #152
Merged
Conversation
…xample Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix signature generation for WxPayMicropayRequest
docs: clarify that micropay sign/appid/nonceStr are auto-filled by the SDK
Feb 22, 2026
binarywang
marked this pull request as ready for review
March 6, 2026 04:19
There was a problem hiding this comment.
Pull request overview
This PR clarifies the micropay API usage in the demo controller docs to prevent callers from manually setting SDK-managed common fields (especially sign), which can lead to signature failures.
Changes:
- Expanded
WxPayController#micropayJavadoc to stateappid/mch_id/nonce_str/signare auto-filled and signed by the SDK. - Added a minimal
WxPayMicropayRequestusage example showing only required business fields.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ayController.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ayController.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.
Users calling
wxPayService.micropay()were getting "签名错误" after manually computing and settingsignviaSignUtils— which conflicts with the SDK's own signing logic.Changes
WxPayController#micropayJavadoc to explicitly state thatappid,mch_id,nonce_str, andsignare populated automatically from merchant config; manually setting them (especiallysign) causes signature failuresOriginal prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.