Is WeChat Pay's key stored in WeChat Mini Programs secure?

WeChat Mini Programs calls WeChat Pay
wx.requestPayment (obj)
this function needs sign authentication, and sign needs WeChat Pay"s key. Is it safe to write the key directly to Mini Program"s JS?

/ / Baidu search found that Mini Program used to have Bug, to get any Mini Program source code. It is very dangerous if the key is exposed.

Q: is it safe? Does it have to be implemented on the server side? It is mainly tedious. I read other people"s cases, all of which were written in Mini Program"s JS.


< H1 > very unsafe < / H1 >

anything related to signature must be sent to the front end after the server has signed it, and the key of the whole process will not appear on the network.

Safety and complexity are scales. Want to be safe must be cumbersome, want to be simple is definitely not safe.
it is Slack Off's practice for others to write the front end. There is no code review

.
Menu