Exemplo n.º 1
0
 public function sendTemplateMsg($data)
 {
     WeUtility::logging('begin send template msg', $data);
     yload()->classs('quick_center', 'wechatutil');
     $json = WechatUtil::json_encode($data);
     WeUtility::logging('end send template msg', $data);
     $ret = $this->sendTpl($this->getAccessToken(), $json);
     return $ret;
 }
Exemplo n.º 2
0
 public function sendText($openid, $text)
 {
     $data = array("touser" => $openid, "msgtype" => "text", "text" => array("content" => $text));
     WeUtility::logging('begin send text', '');
     $json = WechatUtil::json_encode($data);
     WeUtility::logging('end send text', '');
     $ret = $this->sendRes($this->getAccessToken(), $json);
     WeUtility::logging('end send res', '');
     return $ret;
 }