thinkphp automatically cancels transactions

WBOY
Release: 2016-08-23 09:17:42
Original
1243 people have browsed it

When a transaction occurs between users, if someone sends a transaction request, the system will deduct the person's money, but if another user never accepts the transaction. How should the transaction be automatically canceled at this time and the amount of money deducted be returned to the user?

Reply content:

When a transaction occurs between users, if someone sends a transaction request, the system will deduct the person's money, but if another user never accepts the transaction. How should the transaction be automatically canceled at this time and the amount of money deducted be returned to the user?

Make a task plan, regularly detect which transactions have not been completed, and perform refunds and other operations that have not been executed.

For PHP, the most commonly used method for automatic tasks is cron scheduled execution. Others like guard queues are also possible. In short, a permanent or scheduled processing mechanism is needed.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!