diff --git a/src/Service/RiderAPIHandler/CMBRiderAPIHandler.php b/src/Service/RiderAPIHandler/CMBRiderAPIHandler.php index 6f4c6ddb..a14ff160 100644 --- a/src/Service/RiderAPIHandler/CMBRiderAPIHandler.php +++ b/src/Service/RiderAPIHandler/CMBRiderAPIHandler.php @@ -978,17 +978,17 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface $this->debugRequest($req); // allow rider to change service, promo, battery and trade-in options - $required_params = ['jo_id', 'stype_id', 'promo_id']; + $required_params = ['jo_id', 'service_type', 'promo_id']; $data = $this->checkJO($req, $required_params, $jo); if (isset($data['error'])) return $data; // check service type - $stype_id = $req->request->get('stype_id'); - if (!ServiceType::validate($stype_id)) + $service_type = $req->request->get('service_type'); + if (!ServiceType::validate($service_type)) { $data = [ - 'error' => 'Invalid service type - ' . $stype_id + 'error' => 'Invalid service type - ' . $service_type ]; return $data; } @@ -1061,7 +1061,7 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface // generate new invoice $crit = new InvoiceCriteria(); - $crit->setServiceType($stype_id); + $crit->setServiceType($service_type); $crit->setCustomerVehicle($cv); $crit->setHasCoolant($jo->hasCoolant()); @@ -1082,7 +1082,7 @@ class CMBRiderAPIHandler implements RiderAPIHandlerInterface $this->em->flush(); // save job order - $jo->setServiceType($stype_id); + $jo->setServiceType($service_type); // save invoice $jo->setInvoice($invoice);