How to update database after successful payment
How to update database after successful payment
Reply content:
How to update database after successful payment
For example, scan the QR code to pay:
After the payment is successful, a notification will be sent to the URL you specified, that is, the row that you erased.
In that program, you can receive the xml string and parse the information you need.
Generally, you need:
Business result error code transaction type total amount Merchant Order Number Payment Order Number
Update the corresponding records in your database based on the returned Merchant Order Number.
Document: general notification of payment results
After the payment is successful, the url you specified will be called back, that is, the url specified in setpolicy_url. You can write the logic of successful payment in that code.
After the payment is successful, the specified url will be called back over there (a maximum of 8 callbacks within 30 minutes ), therefore, if your business logic is not processed successfully or you have not told the service after processing in the callback address, it will keep calling back, in this case, some of your data may be inserted into many records.