Mini Program WeChat Pay's judgment of success

WeChat Pay document has a notify_url, that is used to send payment notifications to the backend, but when you see many cases, the foreground will write this:

 wx.requestPayment({
 "timeStamp":timeStamp, 
 "nonceStr": nonceStr,
 "package": package, 
 "signType": "MD5",
 "paySign":paySignjs,
 "success":function(res){
    wx.showToast({
                title: "",
                icon: "success",
              })}
....

so there is a question: can success judge whether the payment is successful if the payment call is successful? if I can judge whether the payment is successful, my idea is to directly take the order to the backend to change the data in success, so that notify_url does not feel necessary to deal with it, if not, but many people just write to remind users that payment is successful.

what should be written in this success?

Don't do this. Mini Program's code is transparent to users (just compress it)
an attacker can forge a successful request

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-1b2c0d5-2bac9.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-1b2c0d5-2bac9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?