شعار Setup Share Commerce

Setup Share Commerce

المجتمع
afu-it
setup-share-commerce

Set up, build, debug, review, and explain Share Commerce payment integrations using official Share Commerce docs (devdocs.share-commerce.com) and official plugin source, hosted Payment Request redirect, Seemless (iframe) payment, Enquiry requery, same-day Payment Void, Pre-Auth/Capture, Recurring tokenised billing, server-to-server callbacks, HMAC-SHA256 SCSign signatures, staging/production setup, Merchant ID and Secret Key, IP whitelisting, payment method codes, and WooCommerce/OpenCart/Magento/PrestaShop/EasyStore plugins. Use when working with Share Commerce Malaysia, FPX, cards, Touch 'n Go, Boost, GrabPay, ShopeePay, Maybank QR, Alipay, WeChat Pay, MyIOU BNPL, callback settlement, voids, pre-authorisation, subscriptions, or production readiness.

نظرة عامة

الناشرafu-it
المستودعmalaysia-payment-gateway
اسم المهارةsetup-share-commerce
النجوم
74
التفريعات
11
الملفات المرفقة
4
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 4

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها afu-it على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Setup Share Commerce في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى الإضافات → المهارات.
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/afu-it/malaysia-payment-gateway/tree/main/setup-share-commerce
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات → المهارات → إضافة مهارة → من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
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-share-commerce .claude/skills/setup-share-commerce
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Setup Share Commerce في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج Setup Share Commerce تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Setup Share Commerce بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تترتب أي تكلفة على المهارة غير المستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Share Commerce Payment Gateway

Use this skill for Share Commerce online payment gateway integration work (Share Commerce Sdn Bhd, Kuala Lumpur).

Source

Read references/share-commerce-api.md before giving factual API guidance or writing integration code. It holds the endpoint catalogue, every request/response field table, the SCSign algorithms per endpoint with verified worked examples, status/response code enums, payment method codes, and the documented doc inconsistencies.

Read references/account-setup.md when the user asks how to onboard, which credentials exist, where they come from, staging vs production, IP whitelisting, callback URL registration, plugins, or pricing.

Read references/source-map.md when choosing which official page or plugin file backs a fact, and for coverage notes.

Core Workflow

  1. Identify environment: staging (stagingpayment.share-commerce.com) or production (payment.share-commerce.com).
  2. Identify surface: hosted Payment Request (/payment), Seemless iframe (/seemlesspayment), Pre-Auth (/CreateCheckout/PreAuth), Recurring (/CreateCheckout/Recurring), or a plugin.
  3. Confirm onboarding: Merchant ID, Secret Key, and testing credentials per environment (emailed by Share Commerce), server IP whitelisted, callback URL registered with Share Commerce.
  4. Create a local pending order with a unique MerchantOrderNo before building the request.
  5. Build the request server-side and compute SCSign server-side; never ship the Secret Key to the browser.
  6. Send the browser to the gateway (auto-submitted form POST or GET URL), or redirect to the returned CheckoutUrl.
  7. Treat the browser return to RedirectUrl as UX only, even though it is signed.
  8. Verify the server-to-server callback SCSign with HMAC-SHA256 over the exact received values, then settle idempotently.
  9. Use /enquiry (or /PreAuth/Enquiry, /Recurring/Enquiry) as fallback when the callback is missing.
  10. Re-check amount, currency, MerchantOrderNo, MerchantID, and RespCode == "00" before marking paid.

Core Facts

  • Staging base: https://stagingpayment.share-commerce.com. Production base: https://payment.share-commerce.com.
  • Hosted payment: GET or POST /payment. Requery: POST /enquiry. Void (same day only): POST /Payment/Void.
  • Auth is MerchantID plus an HMAC-SHA256 SCSign keyed with the merchant Secret Key. No bearer token or API key header.
  • Form-style calls (/payment, /seemlesspayment, /PreAuth, /CreateCheckout/PreAuth) carry SCSign as a field: HMAC of all field values concatenated in order, no separators.
  • JSON server calls (/enquiry, /Payment/Void, /PreAuth/*, /CreateCheckout/Recurring, /Recurring/Enquiry) carry SCSign in an HTTP header: HMAC of the raw JSON body.
  • PaymentMethod and Versioning are in the request sign string only when you send them (current plugins send both with Versioning=7).
  • Redirect (GET query) and callback (HTTP POST JSON) carry SCSign: HMAC over the received values in order, excluding SCSign.
  • Response code RespCode: 00 success, 09 pending, 99 failed, IE application error, 10 voided.
  • Amounts are ringgit decimals with 2 places (Decimal(18,2), e.g. 101.50), not sen.
  • Callback URL is not a request field; Share Commerce stores it at onboarding.
  • No refund API is documented; only same-day Payment/Void (full void, response FULL_REFUNDED).
  • Official plugins: WooCommerce, OpenCart 3/4, Magento 2, PrestaShop 1.7 (github.com/share-commerce), EasyStore built in.

Critical Rules

  • Keep the Secret Key server-side. Different keys for staging and production.
  • Do not copy sample sign strings from the docs page: they contain hidden characters (a zero-width space in https://, a non-breaking space in a description).
  • Sign the exact strings you send, in the exact order you send them. Do not reformat amounts (101.50 must stay 101.50, not 101.5).
  • For callbacks, verify over the raw JSON values as received; decoding numbers to floats changes 101.50 to 101.5 in many languages.
  • Use constant-time comparison for SCSign (the official plugins use ==; do better).
  • Do not fulfil from the redirect alone; wait for a verified callback or a verified Enquiry result.
  • Treat RespCode as a string ("00"). Exception: /CreateCheckout/PreAuth returns integer 1/9.
  • Recurring/CreateCheckout and CreateCheckout/PreAuth responses are not signed; trust only later signed redirect/callback/enquiry data.
  • Settlement must be idempotent on MerchantOrderNo plus TxnRefNo.
  • Some published sample hashes do not reproduce (see api reference). Prove your signer against staging before go-live.

Completion Criteria

A Share Commerce integration is done only when:

  1. Requests are built and signed server-side with the environment's Secret Key.
  2. Every request field is present (optional fields as empty strings) in the documented order.
  3. The callback handler verifies SCSign over the received values, constant-time, before any state change, and returns a 200 response (the official plugins reply OK).
  4. Settlement checks MerchantID, MerchantOrderNo, TxnAmount, CurrencyCode, RespCode, and stores TxnRefNo.
  5. Duplicate callbacks, redirect-after-callback, and Enquiry fallback are idempotent.
  6. Tests cover bad signature, tampered amount, wrong order number, 09 pending, 99 failed, IE, and duplicate success.
  7. Config documents SHARECOMMERCE_MERCHANT_ID, SHARECOMMERCE_SECRET_KEY, SHARECOMMERCE_ENV, the redirect URL, and the callback URL registered with Share Commerce, per environment.

Loophole Review Loop

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

  1. List trust boundaries: browser form/redirect, iframe postMessage, backend signer, Share Commerce gateway, callback receiver, raw-body parser, database, fulfilment job, void job, Enquiry poller, whitelisted IPs.
  2. Check bypasses: forged redirect query, forged postMessage, forged callback, signature over re-serialised JSON, float-formatted amount, wrong field order, missing optional field, sandbox/production key mix, reused MerchantOrderNo, pending 09 treated as paid, void after day end, unsigned CreateCheckout response trusted.
  3. Add fixes: server-side signing, raw-value verification, constant-time compare, strict amount/currency/order checks, durable event log, unique constraints, Enquiry fallback, per-environment config.
  4. Re-read references/share-commerce-api.md sections relevant to any gap.
  5. State remaining uncertainty: unverified doc sample hashes, Payment Enquiry signing input, callback retry policy, seemless response Signature algorithm, refund availability, pricing, and settlement timing must be confirmed with Share Commerce.

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة أثناء تحميل المهارة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Setup Share Commerce؟

Set up, build, debug, review, and explain Share Commerce payment integrations using official Share Commerce docs (devdocs.share-commerce.com) and official plugin source, hosted Payment Request redirect, Seemless (iframe) payment, Enquiry requery, same-day Payment Void, Pre-Auth/Capture, Recurring tokenised billing, server-to-server callbacks, HMAC-SHA256 SCSign signatures, staging/production setup, Merchant ID and Secret Key, IP whitelisting, payment method codes, and WooCommerce/OpenCart/Magento/PrestaShop/EasyStore plugins. Use when working with Share Commerce Malaysia, FPX, cards, Touch...

لماذا تستخدم Setup Share Commerce على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Setup Share Commerce عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Setup Share Commerce في TypingMind؟

افتح الإضافات → المهارات → التثبيت من GitHub في TypingMind والصق https://github.com/afu-it/malaysia-payment-gateway/tree/main/setup-share-commerce. يقرأ TypingMind ملف SKILL.md الخاص بها، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Setup Share Commerce؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Setup Share Commerce؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Setup Share Commerce معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Setup Share Commerce مجانية؟

نشرها afu-it على GitHub. راجع المستودع للاطلاع على شروط الترخيص. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا البريدية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇