Tencent CloudBase WeChat Integration
Paste the following prompt into your AI chat to install this skill:
Follow https://skillhub.cn/install/skillhub.md to install @tencent-adm/cloudbase-wechat-integration.
About this skill
The problem
When integrating WeChat Pay, official-account OAuth, JSAPI, or Native QR-code checkout into CloudBase, the hard part is not a single API call. It is keeping the moving pieces separate: wx.requestPayment vs WeixinJSBridge.invoke, Mini Program openid injection, callback verification and decryption, order persistence, idempotency, and amount validation. Hand-rolled code often guesses generated function names, treats frontend success as payment success, or puts merchant secrets into source, READMEs, or chat.
How the skill works
This skill scopes the work to CloudBase Integration Center generated functions and official documentation. It first classifies the scenario, then points to the matching reference: mini-program-pay.md, native-qr-pay.md, official-account-jsapi-pay.md, or official-account-oauth.md. It enforces a conservative workflow:
- Console-first setup: use official
index.mddocs and the CloudBase console forms for Integration Center creation and credentials. - No fixed function names:
pay-commonandoffiaccount-commonare examples only; confirm the actual generated function name before writing calls. - Server-side payment state: rely on callbacks or query results, not UI success.
- Preserve security logic: keep credential environment variables and callback verification/decryption intact, then add order checks, persistence, idempotency, and fulfillment.
Boundaries
Use it for Mini Program Pay, Official Account JSAPI, Native QR-code Pay, Official Account OAuth, generated-function extensions, and troubleshooting. Do not use it for generic CloudBase Web Auth, unrelated cloud function development, or for inventing Manager SDK/Cloud API calls to manage Integration Center. Keep AppSecret, APIv3 keys, and certificates out of source code, README files, commits, and prompts.
Use Cases
- Connect a Mini Program checkout to `wx.requestPayment` and verify that callback state matches the order.
- Start Official Account JSAPI payment inside WeChat H5 using the resolved `openid` and `WeixinJSBridge`.
- Generate a Native QR-code payment URL for PC/Web checkout and poll the query endpoint for final state.
- Diagnose 404s, missing credentials, `openid` mismatches, or failed payment callbacks before changing code.
Best For
- A Mini Program frontend engineer who needs to close the loop between `openid`, order creation, and payment callbacks.
- A CloudBase backend engineer who needs to extend generated payment functions without breaking signature or decryption logic.
- An operations or frontend engineer building WeChat H5 checkout who needs reliable JSAPI payment results.
- An SRE or QA engineer diagnosing payment failures through logs, callbacks, and credential configuration.
Related Skills
A systematic code error fixing skill that follows a five-step workflow: Reproduce, Isolate, Understand, Fix, Verify, to help developers resolve code errors.
Supports inline SVG/HTML rendering and Mermaid code output, covering common technical diagram creation like architecture and flow diagrams.
Publish HTML, static assets, or build output as a public link, with account management, update, deletion, and AI safety review.
A comprehensive browser automation guide covering navigation, interaction, multi-tab management, and data collection, tailored for domestic web ecosystems and tools like Playwright/Selenium.