Resolve "Resq - sms message to customer upon JO completion" #1354

Merged
korina.cordero merged 5 commits from 464-resq-sms-message-to-customer-upon-jo-completion into 465-resq-august-13-release 2020-08-12 05:46:08 +00:00
Showing only changes of commit 938ef24078 - Show all commits

View file

@ -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;
}