diff --git a/WeMini/Operation.php b/WeMini/Operation.php index a3624b9..79b1785 100644 --- a/WeMini/Operation.php +++ b/WeMini/Operation.php @@ -38,4 +38,33 @@ class Operation extends BasicWeChat $url = 'https://api.weixin.qq.com/wxaapi/userlog/userlog_search?access_token=ACCESS_TOKEN'; return $this->callPostApi($url, $data, true); } + + /** + * 获取 mediaId 图片 + * @param array $data + * @return array + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException + */ + public function getFeedbackmedia($data) + { + $query = http_build_query($data); + $url = 'https://api.weixin.qq.com/cgi-bin/media/getfeedbackmedia?'. $query .'&access_token=ACCESS_TOKEN'; + return $this->callGetApi($url); + } + + + /** + * 实时日志查询 + * @param array $data + * @return array + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException + */ + public function getFeedback($data) + { + $query = http_build_query($data); + $url = 'https://api.weixin.qq.com/wxaapi/userlog/userlog_search?'.$query.'&access_token=ACCESS_TOKEN'; + return $this->callGetApi($url); + } } \ No newline at end of file diff --git a/WeMini/Shopping.php b/WeMini/Shopping.php new file mode 100644 index 0000000..244687e --- /dev/null +++ b/WeMini/Shopping.php @@ -0,0 +1,95 @@ +callPostApi($url, $data, true); + } + + /** + * 上传物流信息 + * @param array $data + * @return array + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException + */ + public function uploadShippingInfo($data) + { + $url = 'https://api.weixin.qq.com/user-order/orders?access_token=ACCESS_TOKEN'; + return $this->callPostApi($url, $data, true); + } + + /** + * 上传合单购物详情 + * @param array $data + * @return array + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException + */ + public function uploadCombinedShoppingInfo($data) + { + $url = 'https://api.weixin.qq.com/user-order/orders?access_token=ACCESS_TOKEN'; + return $this->callPostApi($url, $data, true); + } + + /** + * 上传合单物流信息 + * @param array $data + * @return array + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException + */ + public function uploadCombinedShippingInfo($data) + { + $url = 'https://api.weixin.qq.com/user-order/orders?access_token=ACCESS_TOKEN'; + return $this->callPostApi($url, $data, true); + } + + /** + * 验证购物订单上传结果 + * @param array $data + * @return array + * @throws \WeChat\Exceptions\InvalidResponseException + * @throws \WeChat\Exceptions\LocalCacheException + */ + public function ShoppingInfoVerifyUploadResult($data) + { + $url = 'https://api.weixin.qq.com/user-order/shoppinginfo/verify?access_token=ACCESS_TOKEN'; + return $this->callPostApi($url, $data, true); + } + + +} \ No newline at end of file