“Someone placed an order but my phone didn’t ring” is common. The cause is usually not that the push service is broken, but that the settings are not enabled, cron is not running, or the task has failed three times and is left silently in the queue. This article breaks down the notification flow.

KingCMS X1 后台业务页面示例
Notification settings are part of advanced settings: first click “Show advanced settings” on any settings page, and only then does the “Notifications” category appear on the left.

1. Two notification systems, independent of each other

Mobile push (ntfy) and WeChat Official Account notifications are two independent settings and can be enabled at the same time; neither requires enabling a separate module. Mobile push is at “Settings → Notifications → Mobile Push”, and WeChat notifications are at “Settings → Notifications → WeChat Notifications” (the latter is provided by the product module and requires the product module to be enabled).

2. The four fields for mobile push and how they actually behave

FieldRequirement
Service addressFull address; must start with http:// or https://
TopicThe server allows publishing, and the subscriber subscribes to the same topic
Access tokenFill in when the server requires authentication; after saving it is not displayed again, and leaving it blank keeps the original value
Push eventsPayment success + refund success / payment success only / refund success only / do not push

The sending method is to send a plain-text POST to <server address>/<topic>, using Authorization: Bearer <token> when a token is included; the timeout is 10 seconds, and only 2xx counts as success. The body is fixed at three lines: order number, amount, and channel (such as wechat, alipay, balance, points, bank_transfer). The amount in a refund notification is the amount of this refund, not the order total.

Which operations trigger a payment success notification: online payment callbacks, confirming a bank transfer as received in the admin, automatic payment by members using balance or points, and password-free deductions for members. The same order is enqueued only once, and repeated channel callbacks will not push again.

KingCMS X1 AI 助手示例
Notifications first enter the task queue and are picked up by cron every minute; they are not sent directly during the payment request.

3. Queue and retries: stop after three attempts

Notifications are not sent directly with the payment request; they are first enqueued and picked up by cron:run every minute: on success they are deleted; the first failure is retried after about 60 seconds, the second after about 120 seconds, and if the third attempt still fails there are no more automatic retries; the task remains in the jobs table with the error recorded. There is no task list page in the admin; check for rows where last_error is not empty and locked_at is not empty.

Pay special attention to two “silent failures”: when the service address or topic is empty, or no event is checked, the task ends immediately—this is not counted as a failure and there is no prompt; when the WeChat notification’s AppID, AppSecret, or template ID is missing, it likewise ends immediately. When troubleshooting, first confirm that these items have actually been saved.

4. WeChat Official Account notifications have stricter conditions

Four conditions must all be met: the member module is enabled and the Official Account AppID and AppSecret are filled in under “Login methods → WeChat login”; the template ID is filled in under “WeChat notifications”, and the Official Account template message contains the five fields first, keyword1, keyword2, keyword3, and remark; the customer logs in through the Official Account within WeChat and binds their account (otherwise the system does not know which openid to send to); to notify the store owner, fill in the “store owner’s openid”.

There are five types of events, which can be toggled separately for customers and store owners and are all enabled by default: order placed (customer “Order placed notification” / store owner “New order”), payment successful (payment notification / paid), shipped (customer only), credit due, and credit overdue. The two credit types are each sent once by the cron due-date scan, and the amount is the current unpaid balance. The shipping notification includes the courier company and tracking number in the remark when they are available.

5. Checklist

  1. “Show advanced settings” has been clicked, and “Settings → Notifications” can be accessed.
  2. The service address starts with http/https, and the topic is the same on the server and subscriber sides.
  3. If authentication is required, the token is valid; the server can be accessed from the website server and returns 2xx within 10 seconds.
  4. The push events include payment and refund (both are checked by default).
  5. The server runs php x1/bin/kingcms cron:run every minute.
  6. For WeChat notifications, additionally confirm the AppID, AppSecret, template ID, and customer binding relationship.

Summary

The notification flow is “event enqueued → picked up by cron → pushed → retried three times on failure”. When notifications are not received, check in this order: whether the settings are empty (silently skipped), whether cron is running, whether the task has already failed three times, and whether the WeChat side has a binding relationship. Troubleshooting in this order is far more effective than repeatedly resending payment callbacks.