From 14932d90959f121068b061528279a7909ec5c5d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Thu, 22 Sep 2022 16:01:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E5=87=86=E5=8C=96=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=EF=BC=8C=E6=96=B9=E4=BE=BF=20IDE=20=E8=AF=86?= =?UTF-8?q?=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WeMini/Crypt.php | 19 ++-- WeMini/Delivery.php | 38 ++++---- WeMini/Guide.php | 152 +++++++++++++++---------------- WeMini/Image.php | 14 ++- WeMini/Live.php | 47 +++++----- WeMini/Logistics.php | 54 ++++++----- WeMini/Message.php | 14 ++- WeMini/Newtmpl.php | 38 ++++---- WeMini/Ocr.php | 26 +++--- WeMini/Operation.php | 6 +- WeMini/Plugs.php | 26 +++--- WeMini/Poi.php | 18 ++-- WeMini/Qrcode.php | 14 ++- WeMini/Scheme.php | 18 ++-- WeMini/Search.php | 6 +- WeMini/Security.php | 14 ++- WeMini/Soter.php | 6 +- WeMini/Template.php | 26 +++--- WeMini/Total.php | 42 ++++----- WePay/Bill.php | 4 +- WePay/Custom.php | 2 +- WePay/Refund.php | 8 +- WePay/TransfersBank.php | 3 +- WePayV3/Cert.php | 4 +- WePayV3/Contracts/BasicWePay.php | 9 +- WePayV3/Contracts/DecryptAes.php | 2 +- WePayV3/Order.php | 9 +- WePayV3/Refund.php | 9 +- 28 files changed, 291 insertions(+), 337 deletions(-) diff --git a/WeMini/Crypt.php b/WeMini/Crypt.php index 3aaf229..5ff4f36 100644 --- a/WeMini/Crypt.php +++ b/WeMini/Crypt.php @@ -18,7 +18,6 @@ use WeChat\Contracts\BasicWeChat; use WeChat\Contracts\Tools; use WeChat\Exceptions\InvalidDecryptException; use WeChat\Exceptions\InvalidResponseException; -use WeChat\Exceptions\LocalCacheException; use WXBizDataCrypt; @@ -35,7 +34,7 @@ class Crypt extends BasicWeChat * @param string $iv * @param string $sessionKey * @param string $encryptedData - * @return bool + * @return bool|array */ public function decode($iv, $sessionKey, $encryptedData) { @@ -52,7 +51,7 @@ class Crypt extends BasicWeChat * 登录凭证校验 * @param string $code 登录时获取的 code * @return array - * @throws LocalCacheException + * @throws \WeChat\Exceptions\LocalCacheException */ public function session($code) { @@ -68,9 +67,9 @@ class Crypt extends BasicWeChat * @param string $iv 加密算法的初始向量 * @param string $encryptedData 加密数据( encryptedData ) * @return array - * @throws InvalidDecryptException - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidDecryptException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function userInfo($code, $iv, $encryptedData) { @@ -89,8 +88,8 @@ class Crypt extends BasicWeChat * 通过授权码换取手机号 * @param string $code * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getPhoneNumber($code) { @@ -106,8 +105,8 @@ class Crypt extends BasicWeChat * @param null|string $mch_id 微信支付分配的商户号,和商户订单号配合使用 * @param null|string $out_trade_no 微信支付商户订单号,和商户号配合使用 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getPaidUnionId($openid, $transaction_id = null, $mch_id = null, $out_trade_no = null) { diff --git a/WeMini/Delivery.php b/WeMini/Delivery.php index 86d8bda..a968294 100644 --- a/WeMini/Delivery.php +++ b/WeMini/Delivery.php @@ -15,8 +15,6 @@ namespace WeMini; use WeChat\Contracts\BasicWeChat; -use WeChat\Exceptions\InvalidResponseException; -use WeChat\Exceptions\LocalCacheException; /** * 小程序即时配送 @@ -56,8 +54,8 @@ class Delivery extends BasicWeChat * 可以对待接单状态的订单增加小费 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function addTip($data) { @@ -69,8 +67,8 @@ class Delivery extends BasicWeChat * 取消配送单接口 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function cancelOrder($data) { @@ -82,8 +80,8 @@ class Delivery extends BasicWeChat * 获取已支持的配送公司列表接口 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getAllImmeDelivery($data) { @@ -95,8 +93,8 @@ class Delivery extends BasicWeChat * 拉取已绑定账号 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getBindAccount($data) { @@ -108,8 +106,8 @@ class Delivery extends BasicWeChat * 拉取配送单信息 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getOrder($data) { @@ -121,8 +119,8 @@ class Delivery extends BasicWeChat * 模拟配送公司更新配送单状态 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function mockUpdateOrder($data) { @@ -134,8 +132,8 @@ class Delivery extends BasicWeChat * 预下配送单接口 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function preAddOrder($data) { @@ -147,8 +145,8 @@ class Delivery extends BasicWeChat * 预取消配送单接口 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function preCancelOrder($data) { @@ -160,8 +158,8 @@ class Delivery extends BasicWeChat * 重新下单 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function reOrder($data) { diff --git a/WeMini/Guide.php b/WeMini/Guide.php index 483eaaa..586ff16 100644 --- a/WeMini/Guide.php +++ b/WeMini/Guide.php @@ -15,8 +15,6 @@ namespace WeMini; use WeChat\Contracts\BasicWeChat; -use WeChat\Exceptions\InvalidResponseException; -use WeChat\Exceptions\LocalCacheException; /** * 小程序导购助手 @@ -29,8 +27,8 @@ class Guide extends BasicWeChat * 服务号添加导购 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function addGuideAcct($data) { @@ -42,8 +40,8 @@ class Guide extends BasicWeChat * 服务号删除导购 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function delGuideAcct($data) { @@ -55,8 +53,8 @@ class Guide extends BasicWeChat * 服务号获取导购信息 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getGuideAcct($data) { @@ -67,8 +65,8 @@ class Guide extends BasicWeChat /** * 获取服务号的敏感词信息与自动回复信息 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getGuideAcctConfig() { @@ -81,8 +79,8 @@ class Guide extends BasicWeChat * @param integer $page * @param integer $num * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getGuideAcctList($page = 0, $num = 10) { @@ -94,8 +92,8 @@ class Guide extends BasicWeChat * 获取导购聊天记录 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getGuideBuyerChatRecord($data) { @@ -107,8 +105,8 @@ class Guide extends BasicWeChat * 获取导购快捷回复信息 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getGuideConfig($data) { @@ -120,8 +118,8 @@ class Guide extends BasicWeChat * 生成导购二维码 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function guideCreateQrCode($data) { @@ -132,8 +130,8 @@ class Guide extends BasicWeChat /** * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function pushShowWxaPathMenu($data) { @@ -145,8 +143,8 @@ class Guide extends BasicWeChat * 为服务号设置敏感词与自动回复 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function setGuideAcctConfig($data) { @@ -158,8 +156,8 @@ class Guide extends BasicWeChat * 设置导购快捷回复信息 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function setGuideConfig($data) { @@ -171,8 +169,8 @@ class Guide extends BasicWeChat * 更新导购昵称或者头像 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function updateGuideAcct($data) { @@ -184,8 +182,8 @@ class Guide extends BasicWeChat * 添加展示标签信息 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function addGuideBuyerDisplayTag($data) { @@ -197,8 +195,8 @@ class Guide extends BasicWeChat * 为粉丝添加可查询标签 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function addGuideBuyerTag($data) { @@ -210,8 +208,8 @@ class Guide extends BasicWeChat * 添加标签可选值 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function addGuideTagOption($data) { @@ -219,13 +217,12 @@ class Guide extends BasicWeChat return $this->callPostApi($url, $data, true); } - /** * 删除粉丝标签 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function delGuideBuyerTag($data) { @@ -237,8 +234,8 @@ class Guide extends BasicWeChat * 查询展示标签信息 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getGuideBuyerDisplayTag($data) { @@ -250,8 +247,8 @@ class Guide extends BasicWeChat * 查询粉丝标签 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getGuideBuyerTag($data) { @@ -262,8 +259,8 @@ class Guide extends BasicWeChat /** * 查询标签可选值信息 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getGuideTagOption() { @@ -275,8 +272,8 @@ class Guide extends BasicWeChat * 新建可查询标签类型,支持新建4类可查询标签 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function newGuideTagOption($data) { @@ -288,8 +285,8 @@ class Guide extends BasicWeChat * 根据标签值筛选粉丝 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function queryGuideBuyerByTag($data) { @@ -302,8 +299,8 @@ class Guide extends BasicWeChat * 为服务号导购添加粉丝 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function addGuideBuyerRelation($data) { @@ -316,8 +313,8 @@ class Guide extends BasicWeChat * 删除导购的粉丝 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function delGuideBuyerRelation($data) { @@ -330,8 +327,8 @@ class Guide extends BasicWeChat * 查询某一个粉丝与导购的绑定关系 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getGuideBuyerRelation($data) { @@ -344,8 +341,8 @@ class Guide extends BasicWeChat * 通过粉丝信息查询该粉丝与导购的绑定关系 * @param string $openid * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getGuideBuyerRelationByBuyer($openid) { @@ -358,8 +355,8 @@ class Guide extends BasicWeChat * 拉取导购的粉丝列表 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getGuideBuyerRelationList($data) { @@ -372,8 +369,8 @@ class Guide extends BasicWeChat * 将粉丝从一个导购迁移到另外一个导购下 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function rebindGuideAcctForBuyer($data) { @@ -386,8 +383,8 @@ class Guide extends BasicWeChat * 更新粉丝昵称 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function updateGuideBuyerRelation($data) { @@ -400,8 +397,8 @@ class Guide extends BasicWeChat * 删除小程序卡片素材 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function delGuideCardMaterial($data) { @@ -414,8 +411,8 @@ class Guide extends BasicWeChat * 删除图片素材 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function delGuideImageMaterial($data) { @@ -428,8 +425,8 @@ class Guide extends BasicWeChat * 删除文字素材 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function delGuideWordMaterial($data) { @@ -442,8 +439,8 @@ class Guide extends BasicWeChat * 获取小程序卡片素材信息 * @param integer $type * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getGuideCardMaterial($type = 0) { @@ -458,8 +455,8 @@ class Guide extends BasicWeChat * @param integer $start 分页查询,起始位置 * @param integer $num 分页查询,查询个数 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getGuideImageMaterial($type = 0, $start = 0, $num = 10) { @@ -474,8 +471,8 @@ class Guide extends BasicWeChat * @param integer $start 分页查询,起始位置 * @param integer $num 分页查询,查询个数 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getGuideWordMaterial($type = 0, $start = 0, $num = 10) { @@ -488,8 +485,8 @@ class Guide extends BasicWeChat * 添加小程序卡片素材 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function setGuideCardMaterial($data) { @@ -502,8 +499,8 @@ class Guide extends BasicWeChat * 添加图片素材 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function setGuideImageMaterial($data) { @@ -516,8 +513,8 @@ class Guide extends BasicWeChat * 为服务号添加文字素材 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function setGuideWordMaterial($data) { @@ -525,5 +522,4 @@ class Guide extends BasicWeChat $this->registerApi($url, __FUNCTION__, func_get_args()); return $this->callPostApi($url, $data, true); } - } \ No newline at end of file diff --git a/WeMini/Image.php b/WeMini/Image.php index 07e0431..fc9ede0 100644 --- a/WeMini/Image.php +++ b/WeMini/Image.php @@ -15,8 +15,6 @@ namespace WeMini; use WeChat\Contracts\BasicWeChat; -use WeChat\Exceptions\InvalidResponseException; -use WeChat\Exceptions\LocalCacheException; /** * 小程序图像处理 @@ -31,8 +29,8 @@ class Image extends BasicWeChat * @param string $img_url 要检测的图片 url,传这个则不用传 img 参数。 * @param string $img form-data 中媒体文件标识,有filename、filelength、content-type等信息,传这个则不用穿 img_url * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function aiCrop($img_url, $img) { @@ -45,8 +43,8 @@ class Image extends BasicWeChat * @param string $img_url 要检测的图片 url,传这个则不用传 img 参数。 * @param string $img form-data 中媒体文件标识,有filename、filelength、content-type等信息,传这个则不用穿 img_url * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function scanQRCode($img_url, $img) { @@ -59,8 +57,8 @@ class Image extends BasicWeChat * @param string $img_url 要检测的图片 url,传这个则不用传 img 参数 * @param string $img form-data 中媒体文件标识,有filename、filelength、content-type等信息,传这个则不用穿 img_url * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function superresolution($img_url, $img) { diff --git a/WeMini/Live.php b/WeMini/Live.php index b6441ec..87faa6f 100644 --- a/WeMini/Live.php +++ b/WeMini/Live.php @@ -15,8 +15,6 @@ namespace WeMini; use WeChat\Contracts\BasicWeChat; -use WeChat\Exceptions\InvalidResponseException; -use WeChat\Exceptions\LocalCacheException; /** * 小程序直播接口 @@ -29,8 +27,8 @@ class Live extends BasicWeChat * 创建直播间 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function create($data) { @@ -43,8 +41,8 @@ class Live extends BasicWeChat * @param integer $start 起始拉取房间 * @param integer $limit 每次拉取的个数上限 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getLiveList($start = 0, $limit = 10) { @@ -56,8 +54,8 @@ class Live extends BasicWeChat * 获取回放源视频 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getLiveInfo($data = []) { @@ -69,8 +67,8 @@ class Live extends BasicWeChat * 直播间导入商品 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function addLiveGoods($data = []) { @@ -82,8 +80,8 @@ class Live extends BasicWeChat * 商品添加并提审 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function addGoods($data) { @@ -95,8 +93,8 @@ class Live extends BasicWeChat * 商品撤回审核 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function resetAuditGoods($data) { @@ -108,8 +106,8 @@ class Live extends BasicWeChat * 重新提交审核 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function auditGoods($data) { @@ -121,8 +119,8 @@ class Live extends BasicWeChat * 删除商品 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function deleteGoods($data) { @@ -134,8 +132,8 @@ class Live extends BasicWeChat * 更新商品 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function updateGoods($data) { @@ -147,8 +145,8 @@ class Live extends BasicWeChat * 获取商品状态 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function stateGoods($data) { @@ -160,13 +158,12 @@ class Live extends BasicWeChat * 获取商品列表 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getGoods($data) { $url = "https://api.weixin.qq.com/wxaapi/broadcast/goods/getapproved?access_token=ACCESS_TOKEN"; return $this->callPostApi($url, $data, true); } - } \ No newline at end of file diff --git a/WeMini/Logistics.php b/WeMini/Logistics.php index 45cc76f..9fc835f 100644 --- a/WeMini/Logistics.php +++ b/WeMini/Logistics.php @@ -15,8 +15,6 @@ namespace WeMini; use WeChat\Contracts\BasicWeChat; -use WeChat\Exceptions\InvalidResponseException; -use WeChat\Exceptions\LocalCacheException; /** * 小程序物流助手 @@ -29,8 +27,8 @@ class Logistics extends BasicWeChat * 生成运单 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function addOrder($data) { @@ -42,8 +40,8 @@ class Logistics extends BasicWeChat * 取消运单 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function cancelOrder($data) { @@ -54,8 +52,8 @@ class Logistics extends BasicWeChat /** * 获取支持的快递公司列表 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getAllDelivery() { @@ -67,8 +65,8 @@ class Logistics extends BasicWeChat * 获取运单数据 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getOrder($data) { @@ -80,8 +78,8 @@ class Logistics extends BasicWeChat * 查询运单轨迹 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getPath($data) { @@ -92,8 +90,8 @@ class Logistics extends BasicWeChat /** * 获取打印员。若需要使用微信打单 PC 软件,才需要调用 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getPrinter() { @@ -105,8 +103,8 @@ class Logistics extends BasicWeChat * 获取电子面单余额。仅在使用加盟类快递公司时,才可以调用 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getQuota($data) { @@ -118,8 +116,8 @@ class Logistics extends BasicWeChat * 模拟快递公司更新订单状态, 该接口只能用户测试 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function testUpdateOrder($data) { @@ -131,8 +129,8 @@ class Logistics extends BasicWeChat * 配置面单打印员,若需要使用微信打单 PC 软件,才需要调用 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function updatePrinter($data) { @@ -144,8 +142,8 @@ class Logistics extends BasicWeChat * 获取面单联系人信息 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getContact($data) { @@ -157,8 +155,8 @@ class Logistics extends BasicWeChat * 预览面单模板。用于调试面单模板使用 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function previewTemplate($data) { @@ -170,8 +168,8 @@ class Logistics extends BasicWeChat * 更新商户审核结果 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function updateBusiness($data) { @@ -183,8 +181,8 @@ class Logistics extends BasicWeChat * 更新运单轨迹 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function updatePath($data) { diff --git a/WeMini/Message.php b/WeMini/Message.php index 8a4c3a0..6cbcda1 100644 --- a/WeMini/Message.php +++ b/WeMini/Message.php @@ -15,8 +15,6 @@ namespace WeMini; use WeChat\Contracts\BasicWeChat; -use WeChat\Exceptions\InvalidResponseException; -use WeChat\Exceptions\LocalCacheException; /** * 小程序动态消息 @@ -29,8 +27,8 @@ class Message extends BasicWeChat * 动态消息,创建被分享动态消息的 activity_id * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function createActivityId($data) { @@ -42,8 +40,8 @@ class Message extends BasicWeChat * 动态消息,修改被分享的动态消息 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function setUpdatableMsg($data) { @@ -55,8 +53,8 @@ class Message extends BasicWeChat * 下发小程序和公众号统一的服务消息 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function uniformSend($data) { diff --git a/WeMini/Newtmpl.php b/WeMini/Newtmpl.php index d961c4a..cda153d 100644 --- a/WeMini/Newtmpl.php +++ b/WeMini/Newtmpl.php @@ -15,8 +15,6 @@ namespace WeMini; use WeChat\Contracts\BasicWeChat; -use WeChat\Exceptions\InvalidResponseException; -use WeChat\Exceptions\LocalCacheException; /** * 公众号小程序订阅消息支持 @@ -29,8 +27,8 @@ class Newtmpl extends BasicWeChat * 获取小程序账号的类目 * @param array $data 类目信息列表 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function addCategory($data) { @@ -41,8 +39,8 @@ class Newtmpl extends BasicWeChat /** * 获取小程序账号的类目 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getCategory() { @@ -53,8 +51,8 @@ class Newtmpl extends BasicWeChat /** * 获取小程序账号的类目 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function deleteCategory() { @@ -66,8 +64,8 @@ class Newtmpl extends BasicWeChat * 获取帐号所属类目下的公共模板标题 * @param string $ids 类目 id,多个用逗号隔开 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getPubTemplateTitleList($ids) { @@ -80,8 +78,8 @@ class Newtmpl extends BasicWeChat * 获取模板标题下的关键词列表 * @param string $tid 模板标题 id,可通过接口获取 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getPubTemplateKeyWordsById($tid) { @@ -96,8 +94,8 @@ class Newtmpl extends BasicWeChat * @param array $kidList 开发者自行组合好的模板关键词列表,关键词顺序可以自由搭配(例如 [3,5,4] 或 [4,5,3]),最多支持5个,最少2个关键词组合 * @param string $sceneDesc 服务场景描述,15个字以内 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function addTemplate($tid, array $kidList, $sceneDesc = '') { @@ -108,8 +106,8 @@ class Newtmpl extends BasicWeChat /** * 获取当前帐号下的个人模板列表 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getTemplateList() { @@ -121,8 +119,8 @@ class Newtmpl extends BasicWeChat * 删除帐号下的个人模板 * @param string $priTmplId 要删除的模板id * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function delTemplate($priTmplId) { @@ -134,8 +132,8 @@ class Newtmpl extends BasicWeChat * 发送订阅消息 * @param array $data 发送的消息对象数组 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function send(array $data) { diff --git a/WeMini/Ocr.php b/WeMini/Ocr.php index d852c4a..9cbb80e 100644 --- a/WeMini/Ocr.php +++ b/WeMini/Ocr.php @@ -15,8 +15,6 @@ namespace WeMini; use WeChat\Contracts\BasicWeChat; -use WeChat\Exceptions\InvalidResponseException; -use WeChat\Exceptions\LocalCacheException; /** * 小程序ORC服务 @@ -29,8 +27,8 @@ class Ocr extends BasicWeChat * 本接口提供基于小程序的银行卡 OCR 识别 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function bankcard($data) { @@ -42,8 +40,8 @@ class Ocr extends BasicWeChat * 本接口提供基于小程序的营业执照 OCR 识别 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function businessLicense($data) { @@ -55,8 +53,8 @@ class Ocr extends BasicWeChat * 本接口提供基于小程序的驾驶证 OCR 识别 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function driverLicense($data) { @@ -68,8 +66,8 @@ class Ocr extends BasicWeChat * 本接口提供基于小程序的身份证 OCR 识别 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function idcard($data) { @@ -81,8 +79,8 @@ class Ocr extends BasicWeChat * 本接口提供基于小程序的通用印刷体 OCR 识别 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function printedText($data) { @@ -94,8 +92,8 @@ class Ocr extends BasicWeChat * 本接口提供基于小程序的行驶证 OCR 识别 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function vehicleLicense($data) { diff --git a/WeMini/Operation.php b/WeMini/Operation.php index f9561d3..7992614 100644 --- a/WeMini/Operation.php +++ b/WeMini/Operation.php @@ -15,8 +15,6 @@ namespace WeMini; use WeChat\Contracts\BasicWeChat; -use WeChat\Exceptions\InvalidResponseException; -use WeChat\Exceptions\LocalCacheException; /** * 小程序运维中心 @@ -30,8 +28,8 @@ class Operation extends BasicWeChat * 实时日志查询 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function realtimelogSearch($data) { diff --git a/WeMini/Plugs.php b/WeMini/Plugs.php index 06b9776..5f1108c 100644 --- a/WeMini/Plugs.php +++ b/WeMini/Plugs.php @@ -15,8 +15,6 @@ namespace WeMini; use WeChat\Contracts\BasicWeChat; -use WeChat\Exceptions\InvalidResponseException; -use WeChat\Exceptions\LocalCacheException; /** * 微信小程序插件管理 @@ -29,8 +27,8 @@ class Plugs extends BasicWeChat * 1.申请使用插件 * @param string $plugin_appid 插件appid * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function apply($plugin_appid) { @@ -41,8 +39,8 @@ class Plugs extends BasicWeChat /** * 2.查询已添加的插件 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getList() { @@ -54,8 +52,8 @@ class Plugs extends BasicWeChat * 3.删除已添加的插件 * @param string $plugin_appid 插件appid * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function unbind($plugin_appid) { @@ -68,8 +66,8 @@ class Plugs extends BasicWeChat * 修改插件使用申请的状态 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function devplugin($data) { @@ -82,8 +80,8 @@ class Plugs extends BasicWeChat * @param integer $page 拉取第page页的数据 * @param integer $num 表示每页num条记录 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function devApplyList($page = 1, $num = 10) { @@ -96,8 +94,8 @@ class Plugs extends BasicWeChat * 5.修改插件使用申请的状态(供插件开发者调用) * @param string $action dev_agree:同意申请;dev_refuse:拒绝申请;dev_delete:删除已拒绝的申请者 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function devAgree($action = 'dev_agree') { diff --git a/WeMini/Poi.php b/WeMini/Poi.php index 5d9c579..b0d4185 100644 --- a/WeMini/Poi.php +++ b/WeMini/Poi.php @@ -15,8 +15,6 @@ namespace WeMini; use WeChat\Contracts\BasicWeChat; -use WeChat\Exceptions\InvalidResponseException; -use WeChat\Exceptions\LocalCacheException; /** * 微信小程序地址管理 @@ -32,8 +30,8 @@ class Poi extends BasicWeChat * @param string $related_address 经营资质地址 * @param string $related_proof_material 相关证明材料照片临时素材mediaid * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function addBearByPoi($related_name, $related_credential, $related_address, $related_proof_material) { @@ -50,8 +48,8 @@ class Poi extends BasicWeChat * @param integer $page 起始页id(从1开始计数) * @param integer $page_rows 每页展示个数(最多1000个) * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getNearByPoiList($page = 1, $page_rows = 1000) { @@ -63,8 +61,8 @@ class Poi extends BasicWeChat * 删除地点 * @param string $poi_id 附近地点ID * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function delNearByPoiList($poi_id) { @@ -77,8 +75,8 @@ class Poi extends BasicWeChat * @param string $poi_id 附近地点ID * @param string $status 0:取消展示;1:展示 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function setNearByPoiShowStatus($poi_id, $status) { diff --git a/WeMini/Qrcode.php b/WeMini/Qrcode.php index 746881a..f45788e 100644 --- a/WeMini/Qrcode.php +++ b/WeMini/Qrcode.php @@ -16,8 +16,6 @@ namespace WeMini; use WeChat\Contracts\BasicWeChat; use WeChat\Contracts\Tools; -use WeChat\Exceptions\InvalidResponseException; -use WeChat\Exceptions\LocalCacheException; /** * 微信小程序二维码管理 @@ -37,8 +35,8 @@ class Qrcode extends BasicWeChat * @param boolean $is_hyaline 是否需要透明底色 * @param null|string $outType 输出类型 * @return array|string - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function createMiniPath($path, $width = 430, $auto_color = false, $line_color = ["r" => "0", "g" => "0", "b" => "0"], $is_hyaline = true, $outType = null) { @@ -67,8 +65,8 @@ class Qrcode extends BasicWeChat * @param boolean $is_hyaline 是否需要透明底色 * @param null|string $outType 输出类型 * @return array|string - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function createMiniScene($scene, $page, $width = 430, $auto_color = false, $line_color = ["r" => "0", "g" => "0", "b" => "0"], $is_hyaline = true, $outType = null) { @@ -93,8 +91,8 @@ class Qrcode extends BasicWeChat * @param integer $width 二维码的宽度 * @param null|string $outType 输出类型 * @return array|string - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function createDefault($path, $width = 430, $outType = null) { diff --git a/WeMini/Scheme.php b/WeMini/Scheme.php index 81e63fb..b15fc27 100644 --- a/WeMini/Scheme.php +++ b/WeMini/Scheme.php @@ -3,8 +3,6 @@ namespace WeMini; use WeChat\Contracts\BasicWeChat; -use WeChat\Exceptions\InvalidResponseException; -use WeChat\Exceptions\LocalCacheException; /** * 小程序 URL-Scheme @@ -18,8 +16,8 @@ class Scheme extends BasicWeChat * 创建 URL-Scheme * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function create($data) { @@ -31,8 +29,8 @@ class Scheme extends BasicWeChat * 查询 URL-Scheme * @param string $scheme * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function query($scheme) { @@ -44,8 +42,8 @@ class Scheme extends BasicWeChat * 创建 URL-Link * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function urlLink($data) { @@ -57,8 +55,8 @@ class Scheme extends BasicWeChat * 查询 URL-Link * @param string $urllink * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function urlQuery($urllink) { diff --git a/WeMini/Search.php b/WeMini/Search.php index f78ba79..8f3daa5 100644 --- a/WeMini/Search.php +++ b/WeMini/Search.php @@ -15,8 +15,6 @@ namespace WeMini; use WeChat\Contracts\BasicWeChat; -use WeChat\Exceptions\InvalidResponseException; -use WeChat\Exceptions\LocalCacheException; /** * 小程序搜索 @@ -29,8 +27,8 @@ class Search extends BasicWeChat * 提交小程序页面url及参数信息 * @param array $pages * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function submitPages($pages) { diff --git a/WeMini/Security.php b/WeMini/Security.php index af22a35..4869718 100644 --- a/WeMini/Security.php +++ b/WeMini/Security.php @@ -15,8 +15,6 @@ namespace WeMini; use WeChat\Contracts\BasicWeChat; -use WeChat\Exceptions\InvalidResponseException; -use WeChat\Exceptions\LocalCacheException; /** * 小程序内容安全 @@ -30,8 +28,8 @@ class Security extends BasicWeChat * 校验一张图片是否含有违法违规内容 * @param string $media 要检测的图片文件,格式支持PNG、JPEG、JPG、GIF,图片尺寸不超过 750px x 1334px * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function imgSecCheck($media) { @@ -44,8 +42,8 @@ class Security extends BasicWeChat * @param string $media_url * @param string $media_type * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function mediaCheckAsync($media_url, $media_type) { @@ -57,8 +55,8 @@ class Security extends BasicWeChat * 检查一段文本是否含有违法违规内容 * @param string $content * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function msgSecCheck($content) { diff --git a/WeMini/Soter.php b/WeMini/Soter.php index 255c0c5..95b11e5 100644 --- a/WeMini/Soter.php +++ b/WeMini/Soter.php @@ -15,8 +15,6 @@ namespace WeMini; use WeChat\Contracts\BasicWeChat; -use WeChat\Exceptions\InvalidResponseException; -use WeChat\Exceptions\LocalCacheException; /** * 小程序生物认证 @@ -29,8 +27,8 @@ class Soter extends BasicWeChat * SOTER 生物认证秘钥签名验证 * @param array $data * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function verifySignature($data) { diff --git a/WeMini/Template.php b/WeMini/Template.php index 4454232..8034ec0 100644 --- a/WeMini/Template.php +++ b/WeMini/Template.php @@ -15,8 +15,6 @@ namespace WeMini; use WeChat\Contracts\BasicWeChat; -use WeChat\Exceptions\InvalidResponseException; -use WeChat\Exceptions\LocalCacheException; /** * 公众号小程序模板消息支持 @@ -29,8 +27,8 @@ class Template extends BasicWeChat /** * 获取小程序模板库标题列表 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getTemplateLibraryList() { @@ -42,8 +40,8 @@ class Template extends BasicWeChat * 获取模板库某个模板标题下关键词库 * @param string $template_id 模板标题id,可通过接口获取,也可登录小程序后台查看获取 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getTemplateLibrary($template_id) { @@ -56,8 +54,8 @@ class Template extends BasicWeChat * @param string $template_id 模板标题id,可通过接口获取,也可登录小程序后台查看获取 * @param array $keyword_id_list 开发者自行组合好的模板关键词列表,关键词顺序可以自由搭配(例如[3,5,4]或[4,5,3]),最多支持10个关键词组合 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function addTemplate($template_id, array $keyword_id_list) { @@ -68,8 +66,8 @@ class Template extends BasicWeChat /** * 获取帐号下已存在的模板列表 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getTemplateList() { @@ -81,8 +79,8 @@ class Template extends BasicWeChat * 删除模板消息 * @param string $template_id 要删除的模板id * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function delTemplate($template_id) { @@ -94,8 +92,8 @@ class Template extends BasicWeChat * 发送模板消息 * @param array $data 发送的消息对象数组 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function send(array $data) { diff --git a/WeMini/Total.php b/WeMini/Total.php index 6c36bab..2f98463 100644 --- a/WeMini/Total.php +++ b/WeMini/Total.php @@ -15,8 +15,6 @@ namespace WeMini; use WeChat\Contracts\BasicWeChat; -use WeChat\Exceptions\InvalidResponseException; -use WeChat\Exceptions\LocalCacheException; /** * 微信小程序数据接口 @@ -30,8 +28,8 @@ class Total extends BasicWeChat * @param string $begin_date 开始日期 * @param string $end_date 结束日期,限定查询1天数据,end_date允许设置的最大值为昨日 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getWeanalysisAppidDailySummarytrend($begin_date, $end_date) { @@ -44,8 +42,8 @@ class Total extends BasicWeChat * @param string $begin_date 开始日期 * @param string $end_date 结束日期,限定查询1天数据,end_date允许设置的最大值为昨日 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getWeanalysisAppidDailyVisittrend($begin_date, $end_date) { @@ -58,8 +56,8 @@ class Total extends BasicWeChat * @param string $begin_date 开始日期,为周一日期 * @param string $end_date 结束日期,为周日日期,限定查询一周数据 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getWeanalysisAppidWeeklyVisittrend($begin_date, $end_date) { @@ -72,8 +70,8 @@ class Total extends BasicWeChat * @param string $begin_date 开始日期,为自然月第一天 * @param string $end_date 结束日期,为自然月最后一天,限定查询一个月数据 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getWeanalysisAppidMonthlyVisittrend($begin_date, $end_date) { @@ -86,8 +84,8 @@ class Total extends BasicWeChat * @param string $begin_date 开始日期 * @param string $end_date 结束日期,限定查询1天数据,end_date允许设置的最大值为昨日 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getWeanalysisAppidVisitdistribution($begin_date, $end_date) { @@ -100,8 +98,8 @@ class Total extends BasicWeChat * @param string $begin_date 开始日期 * @param string $end_date 结束日期,限定查询1天数据,end_date允许设置的最大值为昨日 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getWeanalysisAppidDailyRetaininfo($begin_date, $end_date) { @@ -114,8 +112,8 @@ class Total extends BasicWeChat * @param string $begin_date 开始日期,为周一日期 * @param string $end_date 结束日期,为周日日期,限定查询一周数据 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getWeanalysisAppidWeeklyRetaininfo($begin_date, $end_date) { @@ -128,8 +126,8 @@ class Total extends BasicWeChat * @param string $begin_date 开始日期,为自然月第一天 * @param string $end_date 结束日期,为自然月最后一天,限定查询一个月数据 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getWeanalysisAppidMonthlyRetaininfo($begin_date, $end_date) { @@ -142,8 +140,8 @@ class Total extends BasicWeChat * @param string $begin_date 开始日期 * @param string $end_date 结束日期,限定查询1天数据,end_date允许设置的最大值为昨日 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getWeanalysisAppidVisitPage($begin_date, $end_date) { @@ -156,8 +154,8 @@ class Total extends BasicWeChat * @param string $begin_date 开始日期 * @param string $end_date 结束日期,开始日期与结束日期相差的天数限定为0/6/29,分别表示查询最近1/7/30天数据,end_date允许设置的最大值为昨日 * @return array - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ public function getWeanalysisAppidUserportrait($begin_date, $end_date) { diff --git a/WePay/Bill.php b/WePay/Bill.php index df79b5a..58c0426 100644 --- a/WePay/Bill.php +++ b/WePay/Bill.php @@ -30,7 +30,7 @@ class Bill extends BasicWePay * @param array $options 静音参数 * @param null|string $outType 输出类型 * @return bool|string - * @throws InvalidResponseException + * @throws \WeChat\Exceptions\InvalidResponseException * @throws \WeChat\Exceptions\LocalCacheException */ public function download(array $options, $outType = null) @@ -52,7 +52,7 @@ class Bill extends BasicWePay * 拉取订单评价数据 * @param array $options * @return array - * @throws InvalidResponseException + * @throws \WeChat\Exceptions\InvalidResponseException * @throws \WeChat\Exceptions\LocalCacheException */ public function comment(array $options) diff --git a/WePay/Custom.php b/WePay/Custom.php index d56c506..8605e6d 100644 --- a/WePay/Custom.php +++ b/WePay/Custom.php @@ -27,7 +27,7 @@ class Custom extends BasicWePay /** * 订单附加信息提交接口 * @param array $options - * @return mixed + * @return array * @throws \WeChat\Exceptions\InvalidResponseException * @throws \WeChat\Exceptions\LocalCacheException */ diff --git a/WePay/Refund.php b/WePay/Refund.php index bbc5a8e..f237fac 100644 --- a/WePay/Refund.php +++ b/WePay/Refund.php @@ -31,7 +31,7 @@ class Refund extends BasicWePay * 创建退款订单 * @param array $options * @return array - * @throws InvalidResponseException + * @throws \WeChat\Exceptions\InvalidResponseException * @throws \WeChat\Exceptions\LocalCacheException */ public function create(array $options) @@ -44,7 +44,7 @@ class Refund extends BasicWePay * 查询退款 * @param array $options * @return array - * @throws InvalidResponseException + * @throws \WeChat\Exceptions\InvalidResponseException * @throws \WeChat\Exceptions\LocalCacheException */ public function query(array $options) @@ -56,8 +56,8 @@ class Refund extends BasicWePay /** * 获取退款通知 * @return array - * @throws InvalidDecryptException - * @throws InvalidResponseException + * @throws \WeChat\Exceptions\InvalidDecryptException + * @throws \WeChat\Exceptions\InvalidResponseException */ public function getNotify() { diff --git a/WePay/TransfersBank.php b/WePay/TransfersBank.php index 5eb7f37..1fdb074 100644 --- a/WePay/TransfersBank.php +++ b/WePay/TransfersBank.php @@ -68,7 +68,7 @@ class TransfersBank extends BasicWePay * 商户企业付款到银行卡操作进行结果查询 * @param string $partnerTradeNo 商户订单号,需保持唯一 * @return array - * @throws InvalidResponseException + * @throws \WeChat\Exceptions\InvalidResponseException * @throws \WeChat\Exceptions\LocalCacheException */ public function query($partnerTradeNo) @@ -121,5 +121,4 @@ class TransfersBank extends BasicWePay Tools::setCache($cacheKey, $data['pub_key'], 600); return $data['pub_key']; } - } \ No newline at end of file diff --git a/WePayV3/Cert.php b/WePayV3/Cert.php index 4a1179d..e1f8a88 100644 --- a/WePayV3/Cert.php +++ b/WePayV3/Cert.php @@ -25,10 +25,10 @@ use WePayV3\Contracts\DecryptAes; */ class Cert extends BasicWePay { - /** * 商户平台下载证书 - * @throws InvalidResponseException + * @return void + * @throws \WeChat\Exceptions\InvalidResponseException */ public function download() { diff --git a/WePayV3/Contracts/BasicWePay.php b/WePayV3/Contracts/BasicWePay.php index f88336d..680c698 100644 --- a/WePayV3/Contracts/BasicWePay.php +++ b/WePayV3/Contracts/BasicWePay.php @@ -17,7 +17,6 @@ namespace WePayV3\Contracts; use WeChat\Contracts\Tools; use WeChat\Exceptions\InvalidArgumentException; use WeChat\Exceptions\InvalidResponseException; -use WeChat\Exceptions\LocalCacheException; use WePayV3\Cert; /** @@ -118,7 +117,7 @@ abstract class BasicWePay * @param string $jsondata 请求数据 * @param bool $verify 是否验证 * @return array - * @throws InvalidResponseException + * @throws \WeChat\Exceptions\InvalidResponseException */ public function doRequest($method, $pathinfo, $jsondata = '', $verify = false) { @@ -204,8 +203,8 @@ abstract class BasicWePay * @param string $sign 原签名值 * @param string $serial 证书序号 * @return int - * @throws InvalidResponseException - * @throws LocalCacheException + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException */ protected function signVerify($data, $sign, $serial = '') { @@ -222,7 +221,7 @@ abstract class BasicWePay * @param string $name * @param null|string $content * @return string - * @throws LocalCacheException + * @throws \WeChat\Exceptions\LocalCacheException */ protected function tmpFile($name, $content = null) { diff --git a/WePayV3/Contracts/DecryptAes.php b/WePayV3/Contracts/DecryptAes.php index 235b18e..8b66155 100644 --- a/WePayV3/Contracts/DecryptAes.php +++ b/WePayV3/Contracts/DecryptAes.php @@ -48,7 +48,7 @@ class DecryptAes * @param string $nonceStr AES GCM nonce * @param string $ciphertext AES GCM cipher text * @return string|bool Decrypted string on success or FALSE on failure - * @throws InvalidDecryptException + * @throws \WeChat\Exceptions\InvalidDecryptException */ public function decryptToString($associatedData, $nonceStr, $ciphertext) { diff --git a/WePayV3/Order.php b/WePayV3/Order.php index ec705e2..5108f1d 100644 --- a/WePayV3/Order.php +++ b/WePayV3/Order.php @@ -16,8 +16,6 @@ namespace WePayV3; use WeChat\Contracts\Tools; use WeChat\Exceptions\InvalidArgumentException; -use WeChat\Exceptions\InvalidDecryptException; -use WeChat\Exceptions\InvalidResponseException; use WePayV3\Contracts\BasicWePay; use WePayV3\Contracts\DecryptAes; @@ -38,7 +36,7 @@ class Order extends BasicWePay * @param string $type 支付类型 * @param array $data 支付参数 * @return array - * @throws InvalidResponseException + * @throws \WeChat\Exceptions\InvalidResponseException */ public function create($type, $data) { @@ -75,7 +73,7 @@ class Order extends BasicWePay * 支付订单查询 * @param string $orderNo 订单单号 * @return array - * @throws InvalidResponseException + * @throws \WeChat\Exceptions\InvalidResponseException */ public function query($orderNo) { @@ -86,7 +84,7 @@ class Order extends BasicWePay /** * 支付通知 * @return array - * @throws InvalidDecryptException + * @throws \WeChat\Exceptions\InvalidDecryptException */ public function notify() { @@ -102,5 +100,4 @@ class Order extends BasicWePay } return $data; } - } diff --git a/WePayV3/Refund.php b/WePayV3/Refund.php index 14de22a..72b6efe 100644 --- a/WePayV3/Refund.php +++ b/WePayV3/Refund.php @@ -30,7 +30,7 @@ class Refund extends BasicWePay * 创建退款订单 * @param array $data 退款参数 * @return array - * @throws InvalidResponseException + * @throws \WeChat\Exceptions\InvalidResponseException */ public function create($data) { @@ -41,7 +41,7 @@ class Refund extends BasicWePay * 退款订单查询 * @param string $refundNo 退款单号 * @return array - * @throws InvalidResponseException + * @throws \WeChat\Exceptions\InvalidResponseException */ public function query($refundNo) { @@ -52,8 +52,8 @@ class Refund extends BasicWePay /** * 获取退款通知 * @return array - * @throws InvalidDecryptException - * @throws InvalidResponseException + * @throws \WeChat\Exceptions\InvalidDecryptException + * @throws \WeChat\Exceptions\InvalidResponseException */ public function notify() { @@ -71,5 +71,4 @@ class Refund extends BasicWePay throw new InvalidDecryptException($exception->getMessage(), $exception->getCode()); } } - } \ No newline at end of file