I have been busy for this time. when I get busy, I feel like I am just a machine that makes money (it seems like how much money can be earned, huh, huh); this will be a little idle time, I want to share with you the problems and solutions encountered during the development of public account payment in the past few days, these "hidden traps have been busy for a long time, when I got busy, I really felt like I was just a machine that made money (like how much money I could earn, huh, huh). This is a little bit of free time, I want to share with you the problems and solutions encountered during the development of public account payment some time ago. if these "hidden traps" are not enough, or problems may occur at critical moments, it's really a big deal.
The shopping mall activities of the Double 12 customers are gaining momentum, but some users frequently say that they cannot pay, and there are problems, as shown below:
At that time, the problem was very strange. I tested the problem multiple times. I had to solve the problem quickly and finally found a solution:
The reason is that a string variable in the program is incorrectly set to the numeric type. the solution is simple. you only need to add double quotation marks to it.
Open the WxPay. JsApiPay. php file.
Set $ jsapi-> SetTimeStamp ($ timeStamp );
Change to $ jsapi-> SetTimeStamp ("$ timeStamp ");
Another thing to note is that because public account payment requires webpage authorization to obtain user information, the page address for initiating payment cannot have parameters. Otherwise, the system will prompt that returnurl does not exist.
Well, this is my personal solution. we have a good solution. You are welcome to propose it and learn and make progress together. thank you!