public function sendOnbehalfMultiLinksMessageByPhoneNum($phoneNum, $linksInfo, $smsMsg, $isNotify) { $timeStamp = time(); ValidateFunc::checkNotNull($this->pageId, "Page id can't be null"); ValidateFunc::checkNotNull($this->appId, "App id can't be null"); ValidateFunc::checkEmptyString($this->accessToken, "Access token can't be empty"); ValidateFunc::checkNotNull($phoneNum, "To phone number can't be null"); ValidateFunc::checkListNotEmpty($linksInfo, "List linkinfos can't be empty"); if ($smsMsg == null) { $smsMsg = ""; } $client = new Client(CommonInfo::$DOMAIN . CommonInfo::$SER_ONBEHALF_PHONE); $links = ZaloSdkHelper::buildLinksParam($linksInfo); $params = array(CommonInfo::$URL_ACT => CommonInfo::$ACT_LINKS, CommonInfo::$URL_PAGEID => $this->pageId, CommonInfo::$URL_APPID => $this->appId, CommonInfo::$URL_ACCESSTOK => $this->accessToken, CommonInfo::$URL_PHONENUM => $phoneNum, CommonInfo::$URL_LINKS => $links, CommonInfo::$URL_SMS => $smsMsg, CommonInfo::$URL_ISNOTIFY => $isNotify == true ? "true" : "false", CommonInfo::$URL_TIMESTAMP => $timeStamp); $client->setDefaultOption('query', $params); return ZaloSdkHelper::sendMessage($client); }