SuperAPI AI Directory

newebpay

Office & productivity

View repository

Updated 10-16 03:14

About this skill

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

Based on the user's requirements, determine the next step:

  • If it includes "integration", "checkout", "create transaction", "MPG" → guide to use /newebpay-checkout
  • If it includes "query", "query", "order status" → guide to use /newebpay-query
  • If it includes "refund", "refund", "cancel" → guide to use /newebpay-refund
  • If no specific request → provide the following environment setup guidance

Environment Setup Check

Ask the user the following questions:

  1. Project Framework: What framework are you using?

    • PHP (Laravel / native PHP / other)
    • Node.js (Express / NestJS / native / other)
    • Python (Django / Flask / FastAPI / other)
    • Other
  2. Environment Status: Do you already have a NewebPay merchant account?

    • Yes, I already have a test environment account
    • Yes, I already have a production environment account
    • No, I need to apply

Environment Variable Setup

Guide the user to create environment variables:

NEWEBPAY_MERCHANT_ID=MS12345678
NEWEBPAY_HASH_KEY=your_hash_key
NEWEBPAY_HASH_IV=your_hash_iv
NEWEBPAY_ENV=test  # test 或 production

Instruct the user:

  1. Create or edit in the project root directory .env file
  2. Add the above environment variables
  3. Ensure .env has been added to .gitignore

Next Step

After completing the environment setup, guide based on the user's requirements:

Requirement Skill Description
Create payment page /newebpay-checkout MPG on-site payment integration
Query transaction status /newebpay-query Transaction Query API
Process refunds /newebpay-refund Credit card/e-wallet refunds

Environment Information

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

Supported Payment Methods

  • Credit Card: One-time payment, installment payment, bonus points deduction
  • 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 on the frontend
  2. Timestamp tolerance is ±120 seconds
  3. Order numbers cannot be duplicated and are limited to 30 characters
  4. ReturnURL/NotifyURL only accepts Port 80/443