When a rider accepts a ride from a driver, payment needs to occur. In this case, the balance value of the rider in the database would be subtracted by the cost of the rider.
Cases:
A rider accepted a ride from a driver; the balance value would be subtracted by the cost of the ride, updating the specific user's balance by the cost of the ride.
The cost of the ride is greater than the current balance of the user. The ride would be negated and the balance of the rider does not change.
When a rider accepts a ride from a driver, payment needs to occur. In this case, the balance value of the rider in the database would be subtracted by the cost of the rider.
Cases: