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

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5fa97-447c3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5fa97-447c3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?