About how WeChat Pay relates merchant orders and how Wechat orders dock?

now do Wechat scan code payment mode 2. The completed mode is that the user selects the quantity, and then clicks to pay immediately. The QR code appears in the pop-up window, and a merchant order number will be generated at this time. Deposit a piece of data in the payment information record sheet. Change the payment status of the corresponding order after the user pays. But there will be a problem, that is, if a customer keeps clicking and paying immediately, but actually does not pay or only pays one of them. In this case, multiple payment records will be generated. At this point, how can I determine which payment record corresponds to the user"s order?

in addition, in the payment notice callback, I searched the Internet for a long time and did not find out how to tell Wechat that I had received and processed this payment notice. How can I return the data?

Php
Mar.16,2021

under the same merchant, the merchant's order number is unique. That is, no matter how many times the user submits it, only one payment order will be generated on Wechat's side.


after clicking the pay now button first, this button should become unclickable. Even if the user submits many times, your order number must be unique each time, so the payment QR code generated each time is different. As for determining which payment record corresponds to the user's order, there will be a callback after the payment is completed. There is the order number of your platform in this callback. You can query the database of your own platform according to this order number, and then modify the corresponding payment completion status. (here, pay attention to the original state at the time of modification.) after the php is finally processed, directly echo 'SUCCESS' tells Weixin that you have received a notice


that the order number you sent to Alipay or Wechat is not the order number of the commodity, but that you "deposit a piece of data in the payment information record table". It is the payment number generated here, and the change is the status of this item after the payment is successful. Then follow the new order status


my understanding is to generate a merchant order number. If the order is not paid successfully, it will be this record for each refresh. Just change the order number until Wechat asynchronously notifies that the order is paid successfully. The next time you click the refresh QR code to generate a new order number for payment. I hope I can help you

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