Joke Collection Website - Public benefit messages - Applet have a way to remind administrators of orders.

Applet have a way to remind administrators of orders.

Does the subject want to ask, "What if the applet reminds the administrator of the order?" The method is as follows.

1. First of all, you need to get the openid of the administrator (you can get it by using the wx.getUserInfo interface in the applet).

2. Then add a template message: in the applet management background, select a template message. In Add Template, enter the name of the template, and select the industry and message type. When editing template content, you need to define the content to be pushed, such as order number, order placing time and other information. After successful creation, a template_id will be generated, which will be used later.

3. Finally, send template message: After calling payment-related APIs such as wx.requestPayment in the code, if the payment is successful, the method of sending template message will be triggered. This method generates a message template according to openid, template_id and the data related to the order, and sends a request to the WeChat server through the wx.request () method, which contains the parameters required for the template message. After the server processes it successfully, it will push the message to the administrator's WeChat account.