Integrations

微信生态集成 · WeChat Integration

Try it

Route WeChat Mini Program Pay, JSAPI Pay, Native QR Pay, and Official Account OAuth through CloudBase Integration Center.

What it does

Classifies a WeChat payment or Official Account OAuth task and loads the matching reference: Mini Program Pay, Official Account JSAPI Pay, Native QR-code Pay, Official Account OAuth, or generated-function extension. Confirms the actual CloudBase environment ID and generated function name before writing calls, rather than assuming fixed names like `pay-common`. Extends Integration Center generated functions with order persistence, idempotency, and callback verification while keeping merchant credentials in the CloudBase console configuration. Returns a console-first workflow anchored on callback-driven payment state, with troubleshooting steps for 404, openid mismatch, and callback failures.

When to use it

  • Add Mini Program WeChat Pay with wx.requestPayment and openid injection
  • Implement Official Account JSAPI pay inside WeChat via WeixinJSBridge
  • Set up Native QR-code pay for a PC web checkout flow
  • Extend an Integration Center generated pay function with order persistence and idempotency

The skill document

CloudBase WeChat Integration

This skill routes WeChat payment and official-account work through CloudBase Integration Center. It gives the agent the stable execution contract and points to official index.md docs for console details that may change.

Sibling skills (local only)

Sibling CloudBase skills ship beside this skill. Use local relative paths such as ../auth-tool-cloudbase/SKILL.md.

If a referenced sibling skill file is missing from this environment, ask the user to install the full CloudBase plugin (or the missing skill). Do not HTTP-fetch remote skill or protocol markdown into the agent context.

Official CloudBase Integration Center docs (human reference — do not treat as skill markdown to fetch into agent context as a sibling skill substitute):

  • CloudBase Integration Center overview: https://docs.cloudbase.net/integration/introduce/index.md
  • CloudBase Integration Center usage: https://docs.cloudbase.net/integration/usage/index.md
  • When cloud function deployment or log operations are needed and no sibling skill is available, use the current platform's CloudBase MCP tools or CloudBase console instead of guessing unsupported APIs.

Activation Contract

Use this first when

  • The user asks about WeChat Pay, 小程序支付, 微信支付, JSAPI 支付, 公众号支付, Native 扫码支付, 二维码支付, refund callbacks, payment callbacks, wx.requestPayment, WeixinJSBridge, openid, or Official Account OAuth in a CloudBase app.
  • The task mentions CloudBase Integration Center, 集成中心, generated payment functions, pay-common, offiaccount-common, or callback routing for WeChat payment.
  • The user needs to extend a CloudBase Integration Center generated function with order persistence, idempotency, fulfillment, or payment-status sync.

Then also read

  • Mini Program structure and preview work -> ../miniprogram-development/SKILL.md (if unavailable, use the current mini program platform docs and the mini-program payment reference in this skill)
  • Web frontend work -> ../web-development/SKILL.md (if unavailable, use the JSAPI or Native references in this skill)
  • Cloud function runtime, logs, deployment, or gateway work -> ../cloud-functions/SKILL.md (if unavailable, use CloudBase console/MCP function tools and the generated-function guidance in this skill)

Do NOT use for

  • Generic CloudBase Web Auth or Mini Program native identity work that does not involve WeChat payment or official-account OAuth.
  • General CloudBase cloud function development unrelated to Integration Center generated functions.
  • Creating or managing Integration Center instances through guessed MCP tools, guessed Manager SDK methods, or undocumented Cloud API actions.
  • Storing merchant secrets, private keys, APIv3 keys, AppSecret values, or certificates in app source code, generated examples, README files, commits, or prompts.

Operating Rules

  1. Treat Integration Center creation as a console-first workflow unless a public Manager SDK or Cloud API contract is confirmed in official docs.
  2. Use official index.md docs for console UI steps and credential fields; do not copy stale console screenshots or invent field names.
  3. Never ask the user to paste secrets into chat. Tell them to configure merchant and official-account credentials in the CloudBase console Integration Center form.
  4. Do not assume generated function names are fixed. pay-common and offiaccount-common are examples; ask for or inspect the actual function name before writing calls.
  5. Treat frontend payment success as UI feedback only. The authoritative payment state must come from server-side query results or payment callbacks.
  6. When extending generated functions, preserve credential environment variables and generated callback verification/decryption logic. Add business logic around order checks, persistence, idempotency, and fulfillment.
  7. Before changing payment or callback code, identify the target scenario and load only the matching reference file.

Routing

TaskReadWhy
Capability selection, console-first boundaries, independent distributionreferences/overview.mdEstablishes the Integration Center model and safety rules
Mini Program WeChat Pay, wx.cloud.callHTTPFunction, wx.requestPaymentreferences/mini-program-pay.mdCovers Mini Program openid injection, order creation, and callback expectations
Official Account JSAPI pay, H5 inside WeChat, WeixinJSBridge.invokereferences/official-account-jsapi-pay.mdCovers official-account openid and JSAPI invocation
Native QR-code pay for PC/Web checkoutreferences/native-qr-pay.mdCovers code_url, QR rendering, and polling/query flow
Official Account OAuth, openid/userinfo retrievalreferences/official-account-oauth.mdCovers OAuth routes generated by the official-account integration
404, missing credentials, openid mismatch, callback failures, logsreferences/troubleshooting.mdProvides diagnosis steps before changing code

Quick Workflow

  1. Classify the scenario: Mini Program Pay, JSAPI Pay, Native Pay, Official Account OAuth, generated-function extension, or troubleshooting.
  2. Load the matching reference and the official index.md docs linked there.
  3. Confirm the actual CloudBase environment ID and generated function name.
  4. Generate or modify only the required client/backend code; keep merchant credentials in Integration Center configuration.
  5. Add order-status query, callback idempotency, and amount/order validation when payment state affects business data.
  6. Verify through function logs, callback logs, and an end-to-end payment sandbox or low-value production test as appropriate.

Minimum Self-Check

  • Did I avoid guessing undocumented Integration Center management APIs?
  • Did I use the actual generated function name instead of assuming pay-common?
  • Did I keep all merchant secrets and certificates out of source code and chat?
  • Did the payment flow rely on callback/query state rather than only frontend success?
  • Did I load only the scenario reference needed for the user's task?

Reference index

All packaged reference files (required for skill lint reachability):

  • mini-program-pay.md
  • native-qr-pay.md
  • official-account-jsapi-pay.md
  • official-account-oauth.md
  • overview.md
  • troubleshooting.md

Related skills

Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.

by nssa.io1.0k installs47 stars

Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.

by johnpatternai22 installs8 stars

Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.

by Iván559 installs18 stars

Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.

by Iván855 installs69 stars

Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.

by fly0pants4.3k installs296 stars

More from binggg

Browse all skills

Get a deliberate aesthetic design spec and high-fidelity prototype before any UI code is written.

by binggg63 installs

Use when medium-to-large changes need explicit requirements, technical design, and task planning before implementation, especially for multi-module work, unclear acceptance criteria, or architecture-heavy requests.

by binggg50 installs

Fast path for a minimal CloudBase Web + database demo (最小前后端 / 最小可用 fullstack / Lovable-like BaaS). Defaults to @cloudbase/js-sdk client CRUD (NoSQL app.database / PG app.rdb), MCP-only schema, preview-first, and forbids cloud functions unless secrets, cron/background jobs, or logic that security rules/RLS cannot express. Use for 搭一套 demo、留言板、Todo、Notes、Kanban, or when users say 带云函数+云数据库 but only need CRUD. NOT for production multi-service backends, CloudRun, WeChat Mini Programs, or tasks that truly need server secrets.

by binggg1 installs

在已有小程序项目中创建新的 AI Skill。当用户想在现有项目中添加自定义 AI 能力(而非安装现成的社区 Skill)时触发。完整流程:理解需求 → 设计接口 → 调用 wxa-skills-generate 生成代码 → wxa-skills-validate 校验通过。

by binggg4 installs1 stars