WeChat becomes developer mode

PHPz
Release: 2017-04-04 11:36:06
Original
2594 people have browsed it


How to import the project into the IDE and start the reference article

In this article you will learn:
1. How to developDebuggingWeChat public account
2. How to turn on developer mode
3. Possible problems
4.weixin_guide How to become a developer mode source code interpretation

How to develop and debug WeChat public accounts

1. Local debugging requires port mapping to the external network. What are the tools?
Recommended ngrok, QQ? Browser
2. Which ngrok can be used?
The previous blog summarized [Let the WeChat public platform access the local machine through port 80. Of course, ngrok is open source and you can also use a server to build one.

3. Development and debugging tools
It is recommended to use real machine testing, WeChat public platforminterfacedebugging tools,WeChat web developer tools

How to enable developers Mode

If the project clone is imported into the IDE and started, and the port has been mapped to the external network, it is relatively simple to become a developer mode.
Test account application address and development document address WIKI
Required before becoming a developer. Make the following configuration:

WeChat becomes developer mode

Modify configuration parameters.png

WeChat becomes developer mode

##Developer ID.png

WeChat becomes developer mode

Enable development mode.png

weixin_guide The default address of becoming a developer url is:

http://domain name[/project Name】/msg

Token needs to be consistent with

Modify configuration parameters.pngMessage encryption method
1. For formal environments, it is recommended to use
security Mode , set encrypt<a href="http://www.php.cn/wiki/1342.html" target="_blank">Message</a> to true, encodingAesKey<a href="http://www.php.cn/wiki/1051.html" target="_blank"></a> must be followed by Turn on the randomly generated EncodingAESKey in the development mode.png to keep it consistent2. If it is a test, it is recommended to set it to plain text mode to facilitate debugging


Reminder: Become Do not use a browser to access the developer's link (this is for the WeChat public account; an error must occur when accessing). After configuring the project, directly

start the project and do port mapping, and subscribe to the test account or the official environment. Problems that may be encountered when using


#Message encryption and decryption interface JCE unrestricted permission policy

java.security.InvalidKeyException<a href="http://www.php.cn/wiki/265.html" target="_blank">:illegal Key Size</a>Exception java.security.InvalidKeyException:illegal Key Size solution:

Download JCE without restrictions on the official website After downloading and decompressing the permission policy file, you can see local_policy.jar, US_export_policy.jar and readme.txt. If

installed JRE, place the two jar files in the %JRE_HOME% \lib\security directory to overwrite the original files. If JDK is installed, place the two jar files in %JDK_HOME%\jre\ Overwrite the original file in the lib\security directory.

JDK7 version JCE download address

JDK8 version JCE download address

weixin_guideHow to become a developer mode source code interpretation

1. How to become a developer mode official reference document

2. For a detailed introduction to Java
servlet version implementation, refer to the previous article written by cnblogs blog 3.
weixin_guide Becoming a developer and all message interactions are required WeixinMsgController And WeixinMsgController also inherits from MsgControllerAdapter Click in to view the source code and you will find that MsgControllerAdapter is an abstract class It provides many abstract methods (processing various events and messages), MsgControllerAdapter inherits from MsgController, one of which is indexAn interceptor is added to the method MsgInterceptor<a href="http://www.php.cn/java/java-Interceptor.html" target="_blank"></a>. The interceptor encrypts and verifies the interactive data. Focus on the checkSignature method

WeChat becomes developer mode

Developer mode interceptor

WeChat becomes developer mode

Signature verification


The above is the detailed content of WeChat becomes developer mode. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!