How to update a database after a successful payment
Reply content:
How to update a database after a successful payment
Take the sweep code payment as an example:
The successful payment will send a notification to the URL you specified, which is the line you erased.
In that program, you receive the XML string from which you want to parse the information you need.
Generally you will need:
业务结果错误代码交易类型总金额商户订单号支付订单号
According to the return merchant order number, go to your own database to update the corresponding records.
Documents: General notification of payment results
After the payment is successful, there will be a callback to the URL you specified, which is the URL specified in Setnotify_url. You can write the logic of the payment success in that code.
After the payment is successful, there will be a callback to the URL you specify (up to 8 times in 30 minutes), so if your business logic is not processed successfully or you do not tell the callback address after the business has been processed, it will always be called back, and it is possible that some of your data will be inserted into many bars.