Opening of the development mode of Java wechat enterprise account development

First of all, the development mode of wechat enterprise number is divided into editing mode (normal mode) and development mode (callback mode). In editing mode, you can only make simple custom menus and automatic reply messages. In order to realize other functions, you have to turn on the developer mode.

1、 Processing flow of messages in editing mode and development mode

1. In the edit mode, all business processes are configured on the wechat server and processed by it

2. In the development mode, the message is processed through the third-party server, and finally sent to the user through the wechat server

The development mode can handle more messages than the editing mode, so you must first open the development mode to develop more functions.

2、 Opening of development mode

In the callback mode, the enterprise can not only actively call the enterprise interface, but also receive user messages or events. The received information uses XML data format, utf8 encoding and AES encryption.

1. After the callback mode is enabled, the parameters to be configured are as follows:

The URL is the servlet to be accessed, and the token and encoding aeskey are obtained randomly, but they should be consistent with those in the project.

2. Verify the validity of the URL

When you submit the above information, the enterprise number will send a get request to the filled in URL. The get request carries four parameters. The enterprise needs to do urlcode processing when obtaining, otherwise the verification will fail.

3. Code

Coreservlet1 class

Tools:

3、 Summary of enterprise pass parameters MSG_ Signature verifies the request. If it is confirmed that the get request comes from the enterprise number, the enterprise application decrypts the echostr parameter and returns the echostr plaintext as it is (without quotation marks). Then the access verification takes effect and the callback mode can be turned on. After opening, some functions will be realized one after another. Please look forward to it!

The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>