feat: Add Mini Program payment bridge for WeChat Pay#13
Open
douglas-ou wants to merge 4 commits intomainfrom
Open
feat: Add Mini Program payment bridge for WeChat Pay#13douglas-ou wants to merge 4 commits intomainfrom
douglas-ou wants to merge 4 commits intomainfrom
Conversation
- Introduced a shared WeChat payment preparation API for event ticket payments. - Defined a Mini Program bridge channel with strict error handling and no fallback policy. - Established a cross-repo bridge contract for compatibility between H5 and Mini Program shell. - Updated event ticket order responses to include channelized payment payloads. - Ensured backward compatibility during the transition phase. This change aims to enhance payment reliability and streamline the payment process for Mini Program users.
- Implemented a new Mini Program upgrade prompt to handle payment bridge requirements. - Enhanced the Event Registration Form and Modal to manage Mini Program upgrade messages. - Integrated WeChat payment client context to facilitate channel selection and payment processing. - Updated server routes to support new payment preparation logic and handle Mini Program bridge capabilities. These changes improve user experience by providing clear upgrade prompts and ensuring compatibility with the Mini Program payment system.
- Introduced a new method to ensure the WeChat Mini Program bridge is properly initialized before requesting payments. - Enhanced the Mini Program bridge interface to include detailed request and response handling for payment operations. - Implemented a message listener for handling bridge responses, improving the reliability of payment requests. - Updated the payment modal to utilize the new bridge methods, ensuring a seamless payment experience. These changes enhance the robustness of the payment integration and improve error handling for Mini Program users.
- Created design documentation outlining the context, goals, and decisions for the Mini Program payment bridge integration. - Added a proposal detailing the changes required for the shared WeChat payment preparation API and the introduction of the Mini Program bridge channel. - Documented tasks for implementation, including server and frontend updates to support the new payment orchestration logic. - Established a bridge contract for compatibility between H5 and Mini Program shell, including error code mappings and security requirements. - Defined requirements for event ticket purchase and WeChat payment orchestration specifications to ensure proper channel selection and payload handling. These additions provide a comprehensive framework for implementing the Mini Program payment bridge, enhancing payment reliability and user experience.
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.
Summary
MiniProgramUpgradePromptcomponent to guide users to upgrade when payment is neededwechat-payment-client-contextmodule for handling WeChat payment orchestrationChanges
New Features
MiniProgramUpgradePrompt- Prompt users to upgrade when payment is required in Mini Programwechat-payment-client-context- Client-side context for WeChat payment orchestrationwechat-prepare.ts- Server-side payment preparation logicComponents Updated
EventRegistrationForm- Support Mini Program payment flowEventRegistrationModal- Integrate upgrade promptPaymentModal- Enhanced for Mini Program bridge integrationDocumentation
openspec/changes/miniprogram-payment-bridge/- Design docs, contracts, and specificationsTest Plan