One-Hub EPay Setup Guide

One-Hub has a built-in payment gateway feature that supports EPay. Create a gateway in the admin panel with the PoPoPay gateway URL, merchant ID and key, and users can top up online. The admin panel is in Chinese, so the original labels are shown alongside.

  • One-Hub
  • Online top-up
  • EPay V1
  • Updated

Before you start

First ask official support to open an integration app. You will get the three values below; every system on this site uses the same set.

ValueNotes
Gateway domainThe payment gateway from support, e.g. https://gateway-domain
Merchant ID (pid)Your app's merchant ID
Merchant key (key)Your app's key, used for MD5 signing. Keep it secret

Create a payment gateway

Sign in as an administrator, open 支付 (Payment) → 网关设置 (Gateway settings), click 新建支付 (New payment), then fill in the table below and save.

FieldWhat to enter
类型 (Type)易支付 (EPay)
名称 (Name)The name users see, e.g. Alipay
回调域名 (Callback domain)Leave blank unless you deliberately receive callbacks on another domain
网关货币类型 (Gateway currency)人民币 (CNY)
支付域名 (Pay domain)https://gateway-domain; /submit.php is appended automatically
商户号 (Merchant ID)pid
密钥 (Key)key
支付类型 (Payment type)支付宝 (Alipay) or 微信 (WeChat Pay). Choose 收银台 (Checkout) to let users pick on the checkout page

Create one gateway for Alipay and one for WeChat Pay; only the name and payment type differ. A single gateway set to 收银台 also works.

One-Hub places orders by page redirect (/submit.php), so no API IP allowlist is needed.

Notify URL

The notify URL is generated automatically, in the form https://your-domain/api/payment/notify/an-id. You do not enter it anywhere. Make sure it is publicly reachable and that your reverse proxy does not block /api/payment/notify/.

Test a top-up

  1. Sign in as a regular user and open the top-up page.
  2. Enter an amount and choose the payment method you just created. You should land on the checkout page.
  3. After paying, return to your site. If the balance has increased and the order appears under 支付 → 订单列表 (Order list), the setup works.

Common problems

SymptomCause and fix
“Signature verification failed” after redirectThe key is wrong or has stray spaces. Copy key again and save. See Fixing signature errors
“No product configured for payment method xxx”That method is not enabled yet, or its code is wrong (WeChat Pay is wxpay, not wechat). If the code is right, ask support to enable it
Paid, but the balance did not changeThe notification did not arrive. Make sure your site is publicly reachable; if you set a callback domain, check that it actually reaches this site. See Missing notifications

For other errors see Troubleshooting; for protocol details see Signing and Async notification.

More integration docs

Get your merchant ID and key

Contact official support to open an integration app. Your gateway URL, pid and key are issued directly, with hands-on help during testing.

Contact support