Skip to content

fix: 修复微信小程序虚拟支付bug#879

Closed
gmslll wants to merge 1 commit intosilenceper:v2from
gmslll:fix-virtualpayment-bug
Closed

fix: 修复微信小程序虚拟支付bug#879
gmslll wants to merge 1 commit intosilenceper:v2from
gmslll:fix-virtualpayment-bug

Conversation

@gmslll
Copy link

@gmslll gmslll commented Feb 2, 2026

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a critical bug in the WeChat mini program virtual payment module where JSON data used for signature calculation differed from the actual request body data, causing signature verification failures.

Changes:

  • Fixed signature mismatch bug by ensuring the same marshaled JSON bytes are used for both signature calculation and HTTP request body
  • Refactored 13 payment-related methods to use a common postRequest helper method, eliminating ~290 lines of duplicated code
  • Consolidated switch case statements in requestAddress method for better readability

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gmslll gmslll closed this Feb 3, 2026
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.

2 participants