callmez\wechat\sdk\Wechat::addPoi PHP Method

addPoi() public method

创建门店
public addPoi ( array $requestParams = [] ) : boolean
$requestParams array $requestParams = [ 'business' => [ 'base_info' => [ 'sid' => '33788392', 商户自己的门店ID, 'business_name' => '麦当劳', 门店名称 'branch_name' => '艺苑路店', 分店名称 'province' => '广东省',门店所在省份 'city' => '广州市', 门店所在城市 'district' => '天河区', 门店所在地区 'address' => '天河北路xx号', 门店详细街道地址 'telephone' => '020-12008888', 门店电话 'categories' => ["美食", "快餐", "小吃"], 门店类型 'offset_type' => 1,坐标类型 'longitude' => '115.32375',门店所在地理位置经度 'latitude' => '25.097486', 门店所在地理位置纬度 'photo_list' => [ ['photo_url' => 'www.xx.com'], ['photo_url' => 'www.xx.com'] ] 'recommend' => '麦辣鸡腿堡套餐,麦乐鸡,全家桶', 推荐品 'special' => '免费 wifi,外卖服务', 特色服务 'introduction' => '麦当劳是全球大型跨国连锁餐厅...', 商户简介 'open_time' => '8:00-20:00', 营业时间 'avg_price' => 35, 人均消费 ] ] ]
return boolean
    public function addPoi($requestParams = [])
    {
        if (!isset($requestParams['business']['base_info'])) {
            return false;
        }
        $result = $this->httpPost(static::WECHAT_ADD_POI_URL . 'access_token=' . $this->getAccessToken(), $requestParams);
        return isset($result['errmsg']) && $result['errmsg'] === 'ok' ? true : false;
    }
Wechat