Update: 2026-07-10 03:04:06
This commit is contained in:
@@ -134,6 +134,17 @@ try {
|
||||
':id' => $rideId,
|
||||
]);
|
||||
|
||||
// 🆕 Refresh Redis cache — this UPDATE just reset status back to 'waiting'
|
||||
// and driver_id to 0. Without this, a passenger polling during a retry
|
||||
// round would keep seeing a stale prior state (e.g. 'arrived') cached
|
||||
// from before the reset.
|
||||
sendToLocationServer('update_ride_state', [
|
||||
'ride_id' => $rideId,
|
||||
'status' => 'waiting',
|
||||
'driver_id' => '0',
|
||||
'passenger_id' => $passengerId,
|
||||
]);
|
||||
|
||||
// 3. حساب العمولة (Kazan) المُحدَّثة بعد الـ bonus
|
||||
$kazan = (float)$price - (float)$priceForDriver;
|
||||
if ($kazan < 0) $kazan = 0; // Floor protection
|
||||
|
||||
Reference in New Issue
Block a user