<?php
use Zwei\WorkWechat\Events\AppEvent;
use Zwei\WorkWechat\Events\AppEventResult;
use Zwei\WorkWechat\Events\Receives\StandardEventReceive;
use Zwei\WorkWechat\Events\Receives\SuiteEventReceive;
$token = 'svSLryqHx';
$encodingAesKey = 'VC2cNUGdzb2YLkVcWSXe0xII3qKabdAWAB1yBwc2Sod';
$suiteEventReceive = new SuiteEventReceive();// 设置suite事件接收类
$standardEventReceive = new StandardEventReceive();// 设置普通事件接收类
$isProcessEvent = true;
// 处理回调url验证
// 处理企业微信推送事件
$obj = new AppEvent($suiteEventReceive, $standardEventReceive, $isProcessEvent);
/* @var $appEventResult AppEventResult */
$appEventResult = $obj->processCallback($token, $encodingAesKey);
echo $appEventResult->getEchoString();// 数据回调和指令回调URL验证返回的是解密后的字符串, 事件返回的是"success"字符串