system Information
php 7.1
MariaDB 10
Laravel 5.6
centos 7
when users place an order using the balance, they will have a series of table operations:
1, update the balance field of the user table
2, insert data
3 into the balance record table, call the third-party API to send the balance change notification (Wechat template notification)
4, create the order
5, and call the third-party API to send the order success notification (Wechat template notification)
has already used the database transaction of Laravel. After deducting the number of the balance field in step 1, the user gets stuck and then exits the program. The record in step 2 and the data behind are gone. How to solve this situation?