Update: 2026-07-10 03:04:06

This commit is contained in:
Hamza-Ayed
2026-07-10 03:04:06 +03:00
parent 2ff7450d0b
commit b18fd027b6
22 changed files with 2661 additions and 96 deletions
@@ -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