polypay-sdk-integration-skill

将 PolyPay 支付接入与商户自动化集成到生产应用:用于添加或修复 PolyPay 托管结账、浏览器 JavaScript 结账、PHP SDK、服务器 REST API 集成、Webhook 验证、沙盒测试、x402 代理支付、通知中心渠道或模板、PolyPay MCP 访问,或 WordPress、WooCommerce、WHMCS、Shopify 支付流程的场景;也适用于传统 PonponPay 集成请求。

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "polypay-sdk-integration-skill":https://skillpi.com/zh/skills/deepskill-099420dea90dfc672ad5ed1f312fb34153090596cd6e5a12153f68f836020bfa。安装前核对上游来源和版本:https://skillhub.cn/skills/user_fcd2b798/polypay-sdk-integration-skill。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

skillhub.cn

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

将 PolyPay 支付接入与商户自动化集成到生产应用:用于添加或修复 PolyPay 托管结账、浏览器 JavaScript 结账、PHP SDK、服务器 REST API 集成、Webhook 验证、沙盒测试、x402 代理支付、通知中心渠道或模板、PolyPay MCP 访问,或 WordPress、WooCommerce、WHMCS、Shopify 支付流程的场景;也适用于传统 PonponPay 集成请求。

0 下载

介绍来源: third_party · user_fcd2b798 · 1.0.0 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
适合谁
来源文档未说明。
输入和输出
来源文档未说明。
软件、账号及付费要求
来源文档未说明。
限制与区别
来源文档未说明。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: polypay-sdk-integration
description: Integrate PolyPay payment acceptance and merchant automation into production applications. Use when Codex needs to add or repair PolyPay hosted checkout, JavaScript browser checkout, PHP SDK or server REST API integration, webhook verification, sandbox testing, x402 agent payments, Notification Center channels or templates, PolyPay MCP access, or WordPress, WooCommerce, WHMCS, and Shopify payment flows. Also trigger for legacy PonponPay integration requests.

PolyPay Production Integration

Integrate the smallest complete PolyPay flow that matches the host application. Preserve existing architecture and prove the result without exposing credentials or charging real funds by default.

Resolve the Integration Mode

Inspect the host framework, runtime, order model, existing payment abstraction, callback routes, package manager, and test commands before editing.

Treat these references as a tested capability snapshot. Before coding against a mutable API, compare them with the installed package types and current official PolyPay documentation. Prefer, in order: the target application's locked dependency types, current official documentation, then this Skill's references. If they conflict, follow the newer authoritative contract and report the Skill drift instead of guessing.

Choose one primary mode:

  • Use hosted checkout for normal customer payments. Let PolyPay own payment-method selection unless the merchant already knows both currency and network.
  • Use @polypay/sdk/browser for browser checkout with a Public Key and server-generated signed parameters.
  • Use polypay/php-sdk for PHP server-side hosted checkout, direct orders, status queries, webhook verification, and x402.
  • Use PolyPay REST endpoints for ordinary Node.js server-side API Key order operations. Do not initialize PolyPayClient with an API Key; that client is browser-only and accepts a Public Key.
  • Use @polypay/sdk/x402 only for server-side JavaScript/TypeScript x402 resources.
  • Reuse the official platform plugin or its conventions for WordPress, WooCommerce, WHMCS, or Shopify.
  • Use PolyPay MCP when the user wants an AI client to operate merchant resources rather than embed checkout code.

Load Only the Required References

Read every reference relevant to the request before implementation. Do not load unrelated references.

Enforce Production Safety

  • Keep API Keys in server-only secret storage. Never place them in browser code, mobile code, URLs, logs, examples with real values, or committed files.
  • Allow Public Keys in browser code only after the merchant configures the exact allowed domains.
  • Generate hosted-checkout signatures on a trusted server and pass signed parameters to the browser. Never invent or omit the required signature.
  • Treat verified webhooks or an authenticated server-side reconciliation query as the source of truth. Never mark an order paid from a redirect, popup close, client poll result alone, or Agent message.
  • Make webhook handling and fulfillment idempotent using stable event, trade, merchant-order, transaction, or nonce identifiers.
  • Use Sandbox first for checkout and order flows. Use mocks and protocol test vectors for x402 until the user explicitly authorizes a low-value production settlement. Do not perform a production charge, settlement, webhook resend, or external write without that authorization.
  • Preserve the platform trade ID and merchant order ID mapping.
  • Validate callback and redirect URLs, use HTTPS in production, and avoid open redirects.
  • Keep x402 settlement and merchant API Keys out of public bundles.

Implement the Complete Slice

  1. Confirm the selected integration mode and required identifiers.
  2. Add only the required dependency and environment-variable names.
  3. Implement order or checkout creation, redirect, and error handling.
  4. Implement verified, replay-resistant, idempotent payment-state handling when local state changes.
  5. Reconcile ambiguous or delayed states through an authenticated server-side query.
  6. Preserve localized user-facing copy and the host application's existing patterns.
  7. Add focused tests for success, invalid signature, duplicate delivery, expired order, and missing configuration where applicable.
  8. Run the repository's typecheck, tests, lint, or build commands that cover the changed paths.

Require Release Evidence

Before reporting completion, verify as many of these as the environment permits:

  • A Sandbox order or hosted-checkout URL is created with the expected merchant order ID.
  • The default checkout URL is locale-neutral; an explicit locale produces a localized path.
  • No secret appears in generated client assets, source control, logs, or returned URLs.
  • A valid webhook changes state exactly once, while invalid, expired, or replayed signatures do not.
  • Redirect success without verified payment does not mark the order paid.
  • x402 returns HTTP 402 before payment and protected content only after successful verification and settlement.
  • Required checks pass and the manual verification path is documented.

If credentials or a running environment are unavailable, complete static validation and report the exact unverified runtime steps. Do not claim end-to-end success without evidence.

Stop and Escalate

Stop and ask for direction when:

  • The requested design exposes an API Key or settlement capability to an untrusted client.
  • The host lacks a stable merchant order identifier or a safe idempotency boundary.
  • The user wants client redirects to be the paid-state authority.
  • The requested currency, network, x402 scheme, or platform capability is not supported by the current reference.
  • Completing the task requires a real production payment or a new external credential not provided by the user.

Report the Result

Report the selected mode, changed files, dependencies, environment-variable names, tests run, manual Sandbox path, and any remaining production verification. Never print credential values.

当前收录版本

1.0.0

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值90/100

亮点

  • 高价值支付集成工具,直接解决生产环境的核心任务痛点
  • 覆盖多种集成模式(hosted checkout、JavaScript、PHP SDK、REST API、x402、平台插件)
  • 支持主流电商平台(WordPress、WooCommerce、WHMCS、Shopify)
触发精准90/100

亮点

  • 触发词精准完整,覆盖多种变体(PolyPay、PonponPay)
  • 边界清晰,明确区分不同集成场景和平台
  • 包含具体技术栈和用例描述
结构规范90/100

亮点

  • Phase/步骤清晰,有明确的出口条件和停止条件
  • 包含端到端示例和验证要求
  • frontmatter完整,结构组织良好
执行可靠90/100

亮点

  • 工具来源明确,参数正确
  • 覆盖主要异常(无效签名、重复交付、过期订单)
  • 不可逆操作有确认机制(生产支付需显式授权)
  • 强调安全最佳实践(密钥管理、webhook验证)
证据可验 (前四项均值)90/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

来源文档未说明。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。