Ejemplo n.º 1
0
 public function getMessageStatus($msgId)
 {
     $timeStamp = time();
     $client = ZaloSdkHelper::buildRequestD($this->pageId, CommonInfo::$ACT_STT, CommonInfo::$SER_QUERY, $timeStamp);
     //plus param
     ValidateFunc::checkEmptyString($msgId, "Message can't be empty");
     ZaloSdkHelper::addParamsHttpGet($client, CommonInfo::$URL_MSGID, $msgId);
     //build Mac
     $lstParams = array($this->pageId, $msgId, $timeStamp, $this->secretKey);
     $mac = ZaloSdkHelper::buildMacForAuthentication($lstParams);
     ZaloSdkHelper::addParamsHttpGet($client, CommonInfo::$URL_MAC, $mac);
     return ZaloSdkHelper::sendQueryStatusMsgPage($client);
 }
Ejemplo n.º 2
0
 public function removeFanPageByPhoneNum($phoneNum)
 {
     $timeStamp = time();
     $client = ZaloSdkHelper::buildRequestD($this->pageId, CommonInfo::$ACT_REMOVE_PHONE, CommonInfo::$SER_FAN, $timeStamp);
     //plus param
     ValidateFunc::checkNotNull($phoneNum, "List phone numbers can't be null");
     ValidateFunc::checkListNotEmpty($phoneNum, "List phone numbers can't be empty");
     $strPhoneNums = $this->convertListToArray($phoneNum);
     ZaloSdkHelper::addParamsHttpGet($client, CommonInfo::$URL_UIDS, $strPhoneNums);
     //build Mac
     $lstParams = array($this->pageId, $strPhoneNums, $timeStamp, $this->secretKey);
     $mac = ZaloSdkHelper::buildMacForAuthentication($lstParams);
     ZaloSdkHelper::addParamsHttpGet($client, CommonInfo::$URL_MAC, $mac);
     return ZaloSdkHelper::sendRemoveFan($client);
 }