Update: 2026-08-01 18:52:11
This commit is contained in:
@@ -38,12 +38,12 @@ try {
|
||||
|
||||
// 🆕 Immutable Fare Lock: Save agreed fixed price in Redis
|
||||
try {
|
||||
$stmtRideInfo = $con->prepare("SELECT price, car_type FROM ride WHERE id = ? LIMIT 1");
|
||||
$stmtRideInfo = $con->prepare("SELECT price, carType FROM ride WHERE id = ? LIMIT 1");
|
||||
$stmtRideInfo->execute([$ride_id]);
|
||||
$rideInfo = $stmtRideInfo->fetch(PDO::FETCH_ASSOC);
|
||||
if ($rideInfo) {
|
||||
$agreedPrice = floatval($rideInfo['price']);
|
||||
$carTypeStr = $rideInfo['car_type'] ?? 'Fixed Price';
|
||||
$carTypeStr = $rideInfo['carType'] ?? 'Fixed Price';
|
||||
$fixedPriceTypes = ['Speed', 'Fixed Price', 'Awfar Car'];
|
||||
if (in_array($carTypeStr, $fixedPriceTypes)) {
|
||||
global $redis;
|
||||
|
||||
Reference in New Issue
Block a user