Add SMS message sending to customer when JO is fulfilled via rider app. #464
This commit is contained in:
parent
28b939a969
commit
938ef24078
1 changed files with 9 additions and 9 deletions
|
|
@ -526,6 +526,15 @@ class ResqRiderAPIHandler implements RiderAPIHandlerInterface
|
|||
// save to customer vehicle battery record
|
||||
$this->jo_handler->updateVehicleBattery($jo);
|
||||
|
||||
// send SMS to customer
|
||||
$phone_number = $jo->getCustomer()->getPhoneMobile();
|
||||
if (!empty($phone_number))
|
||||
{
|
||||
// TODO: put this in config file or somewhere
|
||||
$message = "Your Resq job order has been completed.";
|
||||
$this->rt->sendSMS($phone_number, 'MOTOLITE', $message);
|
||||
}
|
||||
|
||||
$this->em->flush();
|
||||
|
||||
// create warranty
|
||||
|
|
@ -582,15 +591,6 @@ class ResqRiderAPIHandler implements RiderAPIHandlerInterface
|
|||
];
|
||||
$this->mclient->sendEvent($jo, $payload);
|
||||
|
||||
// send SMS to customer
|
||||
$phone_number = $jo->getCustomer()->getPhoneMobile();
|
||||
if (!empty($phone_number))
|
||||
{
|
||||
// TODO: put this in config file or somewhere
|
||||
$message = "Your Resq job order has been completed.";
|
||||
$this->rt->sendSMS($phone_number, 'MOTOLITE', $message);
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue