newebpay

Original🇨🇳 Chinese
Translated
1 scriptsChecked / no sensitive code detected

Provides an overview of NewebPay integration and guides users to the appropriate skill. Use this when starting NewebPay integration, setting up the environment, or needing general guidance about NewebPay.

1installs
Added on

NPX Install

npx skill4agent add paid-tw/skills newebpay

SKILL.md Content (Chinese)

View Translation Comparison →

NewebPay Integration Guide

Your task is to help users set up the NewebPay environment and guide them to the appropriate integration features.

User Requirement Analysis

User Input:
$ARGUMENTS
Determine the next step based on user requirements:
  • If it contains "integration", "checkout", "create transaction", "MPG" → Guide to use
    /newebpay-checkout
  • If it contains "query", "query", "order status" → Guide to use
    /newebpay-query
  • If it contains "refund", "refund", "cancel" → Guide to use
    /newebpay-refund
  • If no specific specification → Provide the following environment setup guidance

Environment Setup Check

Ask the user the following questions:
  1. Project Framework: Which framework are you using?
    • PHP (Laravel / Native PHP / Others)
    • Node.js (Express / NestJS / Native / Others)
    • Python (Django / Flask / FastAPI / Others)
    • Others
  2. Environment Status: Do you already have a NewebPay merchant account?
    • Yes, already have a test environment account
    • Yes, already have a production environment account
    • No, need to apply

Environment Variable Setup

Guide users to set up environment variables:
bash
NEWEBPAY_MERCHANT_ID=MS12345678
NEWEBPAY_HASH_KEY=your_hash_key
NEWEBPAY_HASH_IV=your_hash_iv
NEWEBPAY_ENV=test  # test or production
Guidance for users:
  1. Create or edit the
    .env
    file in the project root directory
  2. Add the above environment variables
  3. Ensure
    .env
    is added to
    .gitignore

Next Steps

After completing the environment setup, guide users based on their needs:
RequirementSkillDescription
Create payment page
/newebpay-checkout
MPG front-end payment integration
Query transaction status
/newebpay-query
Transaction query API
Process refunds
/newebpay-refund
Credit card/e-wallet refund

Environment Information

EnvironmentAPI Base URL
Test
https://ccore.newebpay.com
Production
https://core.newebpay.com

Supported Payment Methods

  • Credit Card: One-time payment, installment payment, point redemption
  • Mobile Payment: Apple Pay, Google Pay, Samsung Pay
  • E-Wallet: LINE Pay, Taiwan Pay, TWQR
  • ATM: WebATM, ATM transfer
  • Convenience Store: Code payment, barcode payment

Important Notes

  1. HashKey and HashIV must be kept confidential and must not be exposed to the front-end
  2. Timestamp allows an error of ±120 seconds
  3. Order numbers cannot be duplicated and are limited to 30 characters
  4. ReturnURL/NotifyURL only accepts ports 80/443