Logo Setup Cardbizpay

Setup Cardbizpay

Cộng đồng
afu-it
setup-cardbizpay

Thiết lập, xây dựng, gỡ lỗi, rà soát và giải thích các tích hợp thanh toán CardBizPay bằng tài liệu dành cho nhà phát triển chính thức của CardBizPay, trang thanh toán được lưu trữ của Merchant API (Payment/Pymt), callback Payment Return URL, chữ ký HMAC-SHA512 dạng base64, truy vấn thanh toán, hủy giao dịch, hoàn tiền, truy vấn hoàn tiền, truy vấn MDR, mã hóa token thẻ qua Open Payment API (AddCard, RemoveCard, Sale, PreAuth, Capture, PreAuthCancel, Void, Refund, TrxnEnq), thiết lập staging/production, Merchant No, Access Key, Secret Key và mã trạng thái. Dùng khi làm việc với CardBizPay hoặc Cardbiz Payment Services, FPX B2C/B2B, DuitNow, thẻ, ví điện tử, thẻ đã lưu, xác thực trước, xác minh callback, truy vấn lại, hoàn tiền hoặc chuẩn bị đưa vào vận hành.

Tổng quan

Nhà phát hànhafu-it
Kho mãmalaysia-payment-gateway
Tên kỹ năngsetup-cardbizpay
Sao
74
Bản fork
11
Tệp đi kèm
5
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 5 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được afu-it công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Setup Cardbizpay trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/afu-it/malaysia-payment-gateway/tree/main/setup-cardbizpay
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

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-cardbizpay .claude/skills/setup-cardbizpay
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Setup Cardbizpay trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Setup Cardbizpay ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Setup Cardbizpay với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

CardBizPay Payment Gateway

Use this skill for CardBizPay (Cardbiz Payment Services Sdn Bhd) payment gateway integration work.

Source

Read references/cardbizpay-api.md before giving factual API guidance or writing integration code. It is the entry point: environments, endpoint catalogue, the signature algorithm, the Merchant API (hosted payment page, enquiry, void, refund, MDR), status codes, and documented doc defects.

Read references/cardbizpay-opa.md when the merchant needs saved cards, merchant-initiated charges, pre-authorization and capture, or the Open Payment API (/opa/*).

Read references/account-setup.md when the user asks how to register, which credentials exist, who configures the return/notify URL, sandbox access, payment methods, settlement, or pricing.

Read references/source-map.md to find the official page behind a fact, or to see what the public docs do not cover.

Core Workflow

  1. Identify environment: staging (https://uat.cardbizpay.com/paymentgateway) or production (https://www.cardbizpay.com/paymentgateway).
  2. Identify API family: Merchant API (/Payment/*, hosted payment page) or Open Payment API (/opa/*, card tokens).
  3. Confirm onboarding: merchant profile created by the CardBizPay administrator, Merchant No, Access Key, Secret Key used for signing (the docs name both and do not say whether they are the same value), API access enabled on the profile, Payment Return URL (Merchant API) or Notify URL (Open Payment API) registered with CardBizPay, payment methods subscribed.
  4. Create a local pending order with a unique OrderId (max 25 chars for /Payment/Pymt) and the exact amount string you will send.
  5. Build the request server-side, compute Signature = base64(HMAC-SHA512(secret, concatenated values in documented field order)), and auto-submit an HTML form POST from the browser to [Base URL]/Payment/Pymt.
  6. Receive the response form POST at the Payment Return URL. Verify Signature over the received values in the documented response field order before trusting any field.
  7. Check RespCode = "00", StatusCode = "A", MerchantNo, OrderId, and TrxnAmount against the local order. Store TrxnId (needed for void and refund).
  8. Requery with GET /Payment/PymtEnq when the return post is missing, unverifiable, or not final (N, W).
  9. Settle idempotently: one order transitions to paid once, no matter how many posts or enquiries arrive.

Core Facts

  • All requests are HTML form posts; enquiries are documented as GET. Field names are case-sensitive PascalCase (MerchantNo, OrderId, TrxnAmount).
  • Signature: HMAC-SHA512 keyed with the merchant Secret Key, output base64. String to sign = values only, no separators, in the documented field order, skipping Signature and any optional field whose value is empty.
  • Official test vector (reproduces): 1000000000000001M12345678910.50 with key Ws123456Ws987654 gives ++lLP7XD4fK3t7PsBz50LdVU35yutApDvZdmlltNXuBsrQnF0B/ed1uxAjSN+3anRjJWrDelYCZoWbsyTzAuMg==.
  • Optional (O) fields must still be posted as parameters, with an empty value if unused.
  • Amounts are ringgit strings, up to 2 decimals, no thousand separators ("10", "10.5", "10.50"). No currency field is documented.
  • ReqDate format yyyyMMddHHmmss. Open Payment API rejects a ReqDate more than 60 minutes from host time.
  • PymtMethodSelect values: empty (all), Card, FPX, FPX B2C, FPX B2B, e-Wallet, DuitNow; comma-separate multiple.
  • CustMobile is required in practice when e-Wallet is subscribed; CustEmail must be supplied to avoid declines.
  • Response code 00 = approved / accepted. Payment status: A approved, D declined, N pending (cancelled after 3 days unpaid), W awaiting status, V voided, C cancelled, Q partially refunded, R fully refunded; Open Payment API adds P pre-auth and T pre-auth cancelled.
  • Void is same-day only and returns 100%; refunds may be full or multiple partial, each with a unique RefundId (max 20).
  • Payment page session counter is 15 minutes.
  • The Payment Return URL is not a request field; CardBizPay configures it on the merchant profile (editable in the Merchant Portal if you have a login).

Critical Rules

  • Keep the Secret Key server-side only; compute signatures on the server, never in browser JavaScript.
  • Never mark paid from the browser landing alone or from an unsigned or badly signed post.
  • Verify the response signature over the exact received string values; do not reformat amounts before hashing.
  • Sign the exact strings you post. If you send "10.5", sign "10.5", and use the same string for later void, refund, and enquiry calls ("should be the same value when calling Payment API").
  • Compare signatures in constant time.
  • Use separate Merchant No and Secret Key per environment; never mix staging credentials with the production base URL.
  • OrderId must be unique per transaction (status 22 duplicate, 13 already paid).
  • Treat N and W as not final; requery, do not fail the order early.
  • Make return-URL handling idempotent; duplicate posts and enquiry results must not double-fulfil.
  • Where the docs are ambiguous (listed in references/cardbizpay-api.md under Doc Defects), confirm with CardBizPay in staging before going live.

Completion Criteria

A CardBizPay integration is done only when:

  1. Payment requests are built and signed server-side with the documented field order and all optional parameters present.
  2. The Payment Return URL (and Notify URL for Open Payment API) is registered with CardBizPay for each environment.
  3. The return handler verifies Signature over the documented response field order, with empty optional fields skipped.
  4. Settlement checks RespCode, StatusCode, MerchantNo, OrderId, TrxnAmount, and stores TrxnId.
  5. PymtEnq requery covers missing or non-final results; void and refund use stored TrxnId and the original amount string.
  6. Tests cover bad signature, wrong amount, wrong order, duplicate post, declined (D), pending (N/W), and approved (A), plus the official signature test vector.
  7. Deployment docs list CARDBIZPAY_MERCHANT_NO, CARDBIZPAY_SECRET_KEY, CARDBIZPAY_BASE_URL, and the registered return URL per environment.

Loophole Review Loop

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

  1. List trust boundaries: browser form post, CardBizPay payment page, Payment Return URL handler, Notify URL handler, enquiry calls, database, fulfilment, void/refund jobs, Merchant Portal settings.
  2. Check bypasses: forged return post, signature over wrong field order, amount reformatted before hashing, empty optional field wrongly included, staging key in production, reused OrderId, stale enquiry, duplicate post, pending N/W treated as failed, void after the same-day window, refund over the remaining amount, token used with the wrong CustId.
  3. Add fixes: server-side signing, strict field-order tables, constant-time compare, local pending order first, PymtEnq fallback, idempotent state transitions, per-environment config, unique RefundId and RequestId.
  4. Re-read the relevant sections of references/cardbizpay-api.md or references/cardbizpay-opa.md.
  5. State remaining uncertainty: whether the return post is browser or server-to-server, enquiry response format, Transaction List encoding, profile-level API enablement, subscribed methods, and pricing. These are not settled by public docs.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Setup Cardbizpay làm được gì?

Thiết lập, xây dựng, gỡ lỗi, rà soát và giải thích các tích hợp thanh toán CardBizPay bằng tài liệu dành cho nhà phát triển chính thức của CardBizPay, trang thanh toán được lưu trữ của Merchant API (Payment/Pymt), callback Payment Return URL, chữ ký HMAC-SHA512 dạng base64, truy vấn thanh toán, hủy giao dịch, hoàn tiền, truy vấn hoàn tiền, truy vấn MDR, mã hóa token thẻ qua Open Payment API (AddCard, RemoveCard, Sale, PreAuth, Capture, PreAuthCancel, Void, Refund, TrxnEnq), thiết lập staging/production, Merchant No, Access Key, Secret Key và mã trạng thái. Dùng khi làm việc với CardBizPay h...

Vì sao nên dùng Setup Cardbizpay trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Setup Cardbizpay là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Setup Cardbizpay trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/afu-it/malaysia-payment-gateway/tree/main/setup-cardbizpay. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Setup Cardbizpay?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Setup Cardbizpay với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Setup Cardbizpay với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Setup Cardbizpay có miễn phí không?

Kỹ năng này được afu-it phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇