How to update database after successful payment on WeChat

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.