In PHP development, you can really do too many things with WeChat. Let’s take a look at the development experience of WeChat payment first. In the future, we will slowly complete other aspects of development code. With WeChat payment, even if you pay a deposit, you are still in the testing phase and cannot be officially released. You must submit orders, shipping notifications and other data to the WeChat system through program testing before you can apply for release. Then, because the API is called through JS in WeChat, the payment authorization directory must be set up in the WeChat backend, and it must go to the second and third level directories. This is a small problem when using the MVC framework. When using MVC, in the development environment, the url is often in the native url format and cannot be guaranteed to be in the form of path /. Therefore, a more reliable way is to create a subfolder of the entity. This requires some modifications in the overall URL of the system. In addition, in the last step, when calling js, for the js library provided here at https://github.com/dodgepudding/wechat-php-sdk, when calling, you must ensure that it is triggered after the page is loaded, that is, the status of WeixinJSBridgeReady, because Only then can we communicate with the jsbridge provided by WeChat browser. 5.24 fixed example:
|