Update: 2026-07-03 01:48:00
This commit is contained in:
@@ -164,6 +164,9 @@ $price_for_passenger = $price;
|
||||
$is_destination_match = isset($tokenData['is_destination_match']) ? (int)$tokenData['is_destination_match'] : 0;
|
||||
$matched_driver_id = isset($tokenData['matched_driver_id']) ? $tokenData['matched_driver_id'] : 0;
|
||||
|
||||
// 👑 Siro Prime Status
|
||||
$is_prime = isset($tokenData['is_prime']) ? (int)$tokenData['is_prime'] : 0;
|
||||
|
||||
// ── 2. تنسيق التواريخ ─────────────────────────────────────────
|
||||
$date_formatted = date("Y-m-d");
|
||||
$time_formatted = date("H:i:s");
|
||||
@@ -286,6 +289,7 @@ try {
|
||||
(string) $carType,
|
||||
number_format($kazan, 2, '.', ''),
|
||||
(string) $passenger_rating,
|
||||
(string) $is_prime, // 👑 Index 34: Prime Status
|
||||
];
|
||||
|
||||
// Direct dispatch للسائقين القريبين
|
||||
|
||||
@@ -174,8 +174,23 @@ try {
|
||||
$payloadTemplate[29] = (string)$startName;
|
||||
$payloadTemplate[30] = (string)$endName;
|
||||
$payloadTemplate[31] = (string)$carType;
|
||||
// 👑 Check Prime Status from Redis
|
||||
$isPrimeFlag = "0";
|
||||
if (isset($redis)) {
|
||||
try {
|
||||
$cachedPrime = $redis->get("prime:passenger:{$passengerId}");
|
||||
if ($cachedPrime) {
|
||||
$primeData = json_decode($cachedPrime, true);
|
||||
if (isset($primeData['is_prime']) && $primeData['is_prime'] == 1) {
|
||||
$isPrimeFlag = "1";
|
||||
}
|
||||
}
|
||||
} catch (Exception $e) {}
|
||||
}
|
||||
|
||||
$payloadTemplate[32] = (string)number_format($kazan, 2, '.', ''); // ← Reduced kazan
|
||||
$payloadTemplate[33] = (string)$passengerRating;
|
||||
$payloadTemplate[34] = $isPrimeFlag; // 👑 Index 34: Prime Status
|
||||
|
||||
ksort($payloadTemplate);
|
||||
$payloadTemplate = array_values($payloadTemplate);
|
||||
|
||||
Reference in New Issue
Block a user