Micro-channel pay (public No. pay JSAPI) various pit - missing parameters - call pay jsapi Missing argument: appld-- paid signature verification fails

Recent get their own public micro-channel number to pay, we encounter a variety of pit, but it boils down, due to the micro-channel document fairly thick dry, conditioning was chaotic, "technology big get" themselves as too high, contempt for the white comparison, of course, I think this is cultural issues, but also to let his brother have extra income problem if too easy, and intrapreneurship fool to leave space technology is relatively smaller, so, whatever the outcome, let the brothers do some contraband along with the boss can still make a lot of dry extra money by artificial technical barriers to achieve common wealth, which is commonly used means of technical people can understand.

1, lack of parameters

This problem generally occurs in parameters or to go missing, or to go make a mistake, carried out in strict accordance with the document. Particular attention to sign a signature, you need to prepare in advance the number of other parameters, and then to get the sign via parameters. Then add in, this can be described with reference to https://www.cnblogs.com/schyzhkj/p/12489933.html inside.

2, calling the lack of payment jsapi parameters: appld

This error is not very accurate, there may be your api key issue, it may be that you really missed parameters, there may not be a problem characters, such as Chinese characters inside you, and you did not do the appropriate encoding process. If the front-end back-end returns the data is correct, then there may be no problem with the front and rear ends of uppercase and lowercase characters on the right, for example, the background you use appId, and in front of js inside you are using appid. It is also possible you directly to the back of the map, such as java directly returned, and you did not do before returning json treatment (such as with JSON.toJSONString (map) to handle it back) very number, get in front of the string you really want to use JSON way access, may produce the above error, the error message is not very accurate, too thick dry, I think "take big technology" is very likely intentionally, because this is not difficult to optimize, mainly on account of brothers interests of the door.

3, pay for the signature verification fails

This error, there is likely to be caused by non-uniform signature, such as the twice, once with md5, once with HA256. Or parameter is misspelled, or Chinese question, is possible. If you return to the front end are correct, it is also possible that you did not match the number of parameters or sensitive, especially the number of parameters, many people tend to ignore this, if you return to the front end of the back-end is seven, you lack submit 6 , it is also entirely possible cause of this problem.

In brief technology, an error message is not accurate. Various pit. More consumption of energy only. Of course, the problem of the above mentioned interests, purely ridicule, to refrain from condemnation, ha ha ha ha ha.

Guess you like

Origin www.cnblogs.com/schyzhkj/p/12514244.html