I have been studying it for a long time. I don't know if I don't know how to study it. I can do too many things at the next hop. let's look at the development experience of payment first, in the future, we will gradually complete the development code payment in other aspects. even if you pay the deposit, you still have to deal with the test phase and cannot officially release it. You must pass the program test to submit the order, delivery notice and other data to the system to apply for release.
Then, because the API is called through JS in the middle, you must set the payment authorization directory in the background and go to the level-2 level-3 directory, which is a small problem for using the MVC framework.
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 a path/
Therefore, the more reliable method is to create object subfolders. in this way, some modifications need to be made to the overall system url.
In addition, the last step, js calls, for the js library provided here in the https://github.com/dodgepudding/wechat-php-sdk, in the call, must ensure that after the page load is triggered, that is, WeixinJSBridgeReady status, in this case, you can communicate with the browser to provide jsbridge.
5.24 repair
For details, refer to the code in microservices.
The code is as follows: