Payment setup
Three menus are involved. Know what each one does:
| Menu | Responsibility |
|---|---|
| Payment plugins | Installed payment plugins — the ability to talk to a given provider |
| Payment interfaces | Merchant IDs, keys and other credentials |
| Payments | Which methods appear on the storefront, and in what order |
The order of operations is: install the plugin → enter credentials → enable and sort.
1. Install a payment plugin
Find your provider in the app store and install it.
2. Enter credentials
Payment interfaces → find the plugin you installed → fill in the merchant ID, key and anything else. What is required differs per provider; the plugin usually documents it.
3. Enable it
Enable it under Payments and set its order and display name. Whatever is enabled here is what buyers see at checkout.
Callbacks
The overwhelming majority of payment problems are callback problems: the money was paid, but the provider could not notify your server, so the order sits at "Unpaid".
Usual causes:
- The callback URL configured at the provider is wrong
- A CDN sits in front of the site and its firewall blocks the callback
- A server firewall rule blocks the provider's IP addresses
For CDN-related failures, use a custom payment callback domain — see site settings.
Zero-value orders
When a product's price is 0, the program skips payment entirely and delivers immediately. Handy for testing the whole chain.
Watch out for a blank member price. If the member price is left empty, logged-in users may see a price of 0 and take the product for free. Fill both prices in.
Payment channel fees
The pay_cost field on an order records the payment channel's fee. Subtract it from amount when calculating profit — see orders.
Currency and exchange rate
Site currency and exchange rate are under Site settings → Other.
The exchange rate means "how much CNY is one unit of the site currency worth". It applies only when submitting an amount to a payment gateway — converting the site's price into the amount the gateway expects.
Precision is six decimal places.
