Setup Senangpay 标志

Setup Senangpay

社区
afu-it
setup-senangpay

使用 senangPay 官方指南页面、Manual Integration API、Direct API、回调、返回 URL、状态查询 API、退款 API、沙盒/生产环境设置、Merchant ID、Secret Key、Hash Type、购物车插件、电商集成、定期付款、payout API、令牌化、分账结算以及 DOKU 迁移参考,搭建、开发、调试、审查并说明 senangPay 支付集成。适用于处理 senangPay 托管结账、支付表单、回调、SHA256/MD5 哈希验证、Direct API 客户端会话、JavaScript Web SDK、FPX 银行列表、退款、套餐功能、沙盒测试或 senangPay 控制面板设置。

概览

发布者afu-it
代码仓库malaysia-payment-gateway
技能名称setup-senangpay
星标数
74
复刻数
11
附带文件
4
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 4 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 afu-it 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Setup Senangpay AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/afu-it/malaysia-payment-gateway/tree/main/setup-senangpay
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/afu-it/malaysia-payment-gateway.git /tmp/malaysia-payment-gateway
mkdir -p .claude/skills
cp -r /tmp/malaysia-payment-gateway/setup-senangpay .claude/skills/setup-senangpay
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Setup Senangpay,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Setup Senangpay。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Setup Senangpay 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

SenangPay

Use this skill for senangPay payment gateway integration work.

Source

Read references/senangpay-api.md before giving factual API guidance or writing integration code. It contains source URLs, integration surfaces, environment URLs, endpoint roles, parameter rules, hash formulas, callback behavior, query APIs, Direct API, FPX bank list, refund API, and settlement/security cautions.

Read references/account-setup.md when user asks how to register, which credentials are needed, where keys come from, sandbox setup, dashboard setup, package capabilities, pricing, support, or migration context.

Read references/source-map.md when choosing which senangPay guide page applies to hosted checkout, Direct API, plugins, callbacks, query APIs, refunds, recurring, tokenisation, split settlement, payout, sandbox, or migration.

Core Workflow

  1. Identify environment: sandbox or production.
  2. Identify integration surface: hosted/manual payment form, shopping cart plugin, e-commerce platform integration, Direct API, recurring payment, refund API, payout API, tokenisation, or split settlement.
  3. Confirm credentials and dashboard setup: Merchant ID, Secret Key, Hash Type, Return URL, and Callback URL.
  4. Create a local pending payment before sending the customer to senangPay.
  5. Generate request hash server-side using the correct formula and account Hash Type.
  6. Redirect to hosted checkout or create a Direct API client session server-side.
  7. Treat Return URL as browser UX only; do not fulfil from return alone.
  8. Verify callback/return hash server-side, requery order or transaction status when needed, then settle only after amount, order ID, status, merchant, environment, and provider transaction reference match.
  9. Make settlement idempotent because senangPay can send multiple callbacks and later callbacks can supersede earlier statuses.

Core Facts

  • Production hosted checkout URL: https://app.senangpay.my/payment/{merchant_id}.
  • Sandbox hosted checkout URL: https://sandbox.senangpay.my/payment/{merchant_id}.
  • Hosted/manual checkout accepts GET or POST parameters.
  • Hosted/manual checkout amount uses two decimal places, for example 25.50.
  • Direct API amount uses cents, for example 200 means RM 2.00.
  • Manual request hash source sequence: {secret_key}{detail}{amount}{order_id}.
  • Return/callback status values: 1 successful, 0 failed, 2 pending authorization.
  • Return/callback verification source sequence: {secret_key}{status_id}{order_id}{transaction_id}{msg}.
  • Query order status endpoint: GET https://app.senangpay.my/apiv1/query_order_status.
  • Query transaction status endpoint: GET https://app.senangpay.my/apiv1/query_transaction_status.
  • Direct API endpoints: POST https://api.senangpay.my/payment/v3 and POST https://api.sandbox.senangpay.my/payment/v3.
  • Direct API requires Enterprise package, authorised merchant access, and outgoing server IP whitelisting.
  • Merchant ID and Secret Key are in Dashboard > Settings > Profile > Shopping Cart Integration Link.
  • SHA256 is recommended. MD5 is legacy/deprecated and should only be used for systems that explicitly require it.
  • Callback URL uses HTTP POST and must output exactly OK without HTML tags for successful receipt.

Critical Rules

  • Keep Secret Key and private hash inputs server-side only.
  • Do not mark paid from Return URL, frontend event, SDK response, or browser redirect alone.
  • Prefer SHA256/HMAC-SHA256 and avoid MD5 unless supporting an explicit legacy integration.
  • Always verify hash with the exact sequence documented for the active flow.
  • Verify local order, expected amount, status, transaction ID/reference, merchant ID, and environment before marking paid.
  • Log callback events durably and make processing idempotent before returning OK.
  • Expect duplicate callbacks for the same transaction.
  • Expect pending or failed callbacks before a later successful callback; latest callback can be the most up-to-date status.
  • Avoid callback redirects and session-dependent callback handlers.
  • Separate sandbox and production credentials, URLs, callback URLs, Return URLs, and dashboard settings.
  • For Direct API, never expose Secret Key in browser JavaScript and remember UUID is valid for only 60 seconds.
  • For refund API, store local refund attempts and do not retry blindly after duplicate, partial-refund, refund-window, or amount-exceeded errors.
  • If package capability, payment method availability, settlement timing, current pricing, IP whitelisting, migration behavior, or dashboard state matters, verify live senangPay dashboard/docs/support before claiming certainty.

Loophole Review Loop

When asked whether a senangPay strategy is "100% confident", run this loop until no factual gaps remain:

  1. List trust boundaries: browser Return URL, backend checkout creator, senangPay hosted checkout, Direct API session endpoint, JavaScript SDK, callback receiver, query APIs, database, fulfilment job, refund job, dashboard settings, and package/channel activation.
  2. Check bypasses: fake success return, forged callback, wrong hash type, wrong hash sequence, wrong amount format, wrong order ID, wrong merchant ID, sandbox/live mix, duplicate callback, failed callback followed by success, pending marked paid, stale Direct API UUID, Direct API Secret Key leak, unwhitelisted Direct API server IP, inactive FPX bank, duplicate refund request, partial refund unsupported, and refund after 180-day window.
  3. Add fixes: server-side local pending payment, server-side hash generation, callback hash verification, status requery, strict amount/status/order checks, idempotency keys, callback event log, exact OK response after durable recording, environment-separated config, bank status filtering, package capability checks, and refund idempotency.
  4. Re-read references/senangpay-api.md sections relevant to any gap.
  5. State remaining uncertainty if it depends on current package, channel enablement, pricing, dashboard configuration, DOKU migration state, or senangPay support approval.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Setup Senangpay AI 技能有什么作用?

使用 senangPay 官方指南页面、Manual Integration API、Direct API、回调、返回 URL、状态查询 API、退款 API、沙盒/生产环境设置、Merchant ID、Secret Key、Hash Type、购物车插件、电商集成、定期付款、payout API、令牌化、分账结算以及 DOKU 迁移参考,搭建、开发、调试、审查并说明 senangPay 支付集成。适用于处理 senangPay 托管结账、支付表单、回调、SHA256/MD5 哈希验证、Direct API 客户端会话、JavaScript Web SDK、FPX 银行列表、退款、套餐功能、沙盒测试或 senangPay 控制面板设置。

为什么在 TypingMind 中使用 Setup Senangpay?

因为您只需安装一次,就能搭配任何模型使用。Setup Senangpay 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Setup Senangpay?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/afu-it/malaysia-payment-gateway/tree/main/setup-senangpay。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Setup Senangpay?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Setup Senangpay 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Setup Senangpay 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Setup Senangpay AI 技能免费吗?

afu-it 已在 GitHub 上发布了该技能。请查看代码仓库了解许可条款。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇