Property | Type | Description | |
---|---|---|---|
$appId | 公众号appId | ||
$appSecret | 公众号appSecret | ||
$cachePrefix | string | 数据缓存前缀 | |
$cacheTime | integer | 数据缓存时长 | |
$errorCode | array | 回调错误代码 可用于检索用户返回错误详情 | |
$lastErrorInfo | 最后请求的错误信息 | ||
$operCode | array | 操作ID(会化状态)定义 可用于显示客服聊天记录的操作详情 | |
$partnerId | 财付通商户身份标识。 | ||
$partnerKey | 财付通商户权限密钥 Key | ||
$paySignKey | 公众号支付请求中用于加密的密钥 Key,可验证商户唯一身份,PaySignKey 对应于支付场景中的 appKey 值。 | ||
$token | 公众号接口验证token,可由您来设定. 并填写在微信公众平台->开发者中心 |
Property | Type | Description | |
---|---|---|---|
$_accessToken | |||
$_jsApiTicket |
Method | Description | |
---|---|---|
activateMemberCard ( array $requestParams = [] ) : boolean | 激活/绑定会员卡 | |
addDeliveryTemplate ( array $deliveryTemplate ) : integer | boolean | 增加邮费模板 | |
addPoi ( array $requestParams = [] ) : boolean | 创建门店 | |
addProductStock ( $productId, $quantity, array $skuInfo = null ) : boolean | 增加库存 | |
addShelf ( array $data ) : boolean | 增加货架 | |
addShopGroup ( string $groupName, array $productIdList ) : boolean | 增加店铺分组 | |
cancelSendArticles ( $messageId ) | 取消群发消息 | |
cardConsume ( $code, null $cardId = null ) : array | boolean | 消费(核销)卡券 | |
checkOauth2AccessToken ( $accessToken, $openId ) : boolean | 检验授权凭证(access_token)是否有效 | |
checkSignature ( string $signature = null, string $timestamp = null, string $nonce = null ) : boolean | 微信服务器请求签名检测 | |
closeOrder ( integer $orderId ) : boolean | 关闭订单 | |
createCard ( array $requestParams = [] ) : array | boolean | 创建卡券 | |
createCardQrcode ( array $requestParams = [] ) : boolean | string | 创建卡券二维码 | |
createGroup ( $name ) : array | boolean | 创建分组 | |
createMenu ( array $buttons ) : boolean | 创建菜单 | |
createProduct ( array $data ) : array | boolean | 添加商品 | |
createQrCode ( array $params ) : array | boolean | 创建QR二维码 调用的参数示例 $params = [ 二维码类型,QR_SCENE为临时,QR_LIMIT_SCENE为永久,QR_LIMIT_STR_SCENE为永久的字符串参数值,默认为QR_SCENE 'action_name' => 'QR_SCENE', 'action_info' => [ 'scene' => [ 场景值ID,临时二维码时为32位非0整型,永久二维码时最大值为100000(目前参数只支持1--100000) 'scene_id' => $sceneId, 场景值ID(字符串形式的ID),字符串类型,长度限制为1到64,仅永久二维码支持此字段 'scene_str' => $sceneStr ] ] ]; | |
createShortUrl ( $longUrl ) : boolean | 创建短链接 | |
deleteCard ( $card_id ) : boolean | 删除卡券 | |
deleteDeliverTemplate ( integer $templateId ) : boolean | 删除邮费模板 | |
deleteMenu ( ) : boolean | 删除菜单 | |
deletePoi ( $poi_id ) : boolean | 删除门店 | |
deleteProduct ( $productId ) : boolean | 删除商品 | |
deleteShelf ( $shelfId ) : boolean | 删除货架 | |
deleteShopGroup ( integer $groupId ) : boolean | 删除店铺分组 | |
getAccessToken ( boolean $force = false ) : string | 获取AccessToken 会自动判断超时时间然后重新获取新的token (会智能缓存accessToken) | |
getBatchCards ( integer $offset, integer $count = 50 ) : boolean | 得到批量查询的卡券(获取卡券列表) | |
getCard ( $card_id ) : boolean | 得到单个卡券详情 | |
getCardColors ( ) : boolean | 获取卡券颜色列表 | |
getCategoryProperty ( $cateId ) : array | boolean | 获取指定分类的所有属性 | |
getCategorySkuList ( $cateId ) : array | boolean | 获取指定分类的单品 | |
getCategorySubCategory ( $cateId ) : array | boolean | 获取指定分类的子分类 | |
getCode ( $code, null $card_id = null ) : array | boolean | 得到Code信息 | |
getCustomerServiceRecords ( string $openId, integer $startTime, integer $endTime, integer $pageIndex = 1, integer $pageSize = 1000 ) : array | boolean | 获取关注者的客服聊天记录 | |
getDecryptCode ( $encrypt_code ) : boolean | 获取解码后的Code | |
getDeliverTemplate ( integer $templateId ) : array | boolean | 获取指定ID的邮费模板 | |
getDeliverTemplateList ( ) : array | boolean | 获取所有邮费模板 | |
getGroupId ( $openId ) : array | boolean | 根据关注者openID获取分组ID | |
getGroupList ( ) : array | boolean | 获取分组列表 | |
getJsApiTicket ( boolean $force = false ) : mixed | 获取jsapi_ticket 会自动判断超时时间然后重新获取新的ticket (会智能缓存jsApiTicket) | |
getMedia ( $mediaId ) : array | boolean | 下载媒体文件 | |
getMemberInfo ( $openId, string $lang = 'zh_CN' ) : array | boolean | 获取关注者基本信息 | |
getMemberList ( string $nextOpenId = null ) : array | boolean | 获取关注者列表 | |
getMenuList ( ) : boolean | 获取菜单列表 | |
getOauth2AccessToken ( $code, string $grantType = 'authorization_code' ) : array | 网页授权获取用户信息:第二步 通过跳转到getOauth2AuthorizeUrl返回的授权code获取用户资料 (该函数和getAccessToken函数作用不同.请参考文档) | |
getOauth2AuthorizeUrl ( $redirectUrl, string $state = 'authorize', string $scope = 'snsapi_base' ) : string | 网页授权获取用户信息:第一步 通过此函数生成授权url | |
getOrder ( $orderId ) : boolean | 根据订单ID获取订单详情 | |
getOrderByFilter ( array $condition ) : boolean | 根据订单状态/创建时间获取订单详情 | |
getPoi ( $poi_id ) : boolean | 查询门店 | |
getPoiList ( integer $begin, integer $limit = 20 ) : boolean | 查询门店列表 | |
getProduct ( $productId ) : array | boolean | 获取商品信息 | |
getProductByStatus ( $status ) : array | boolean | 获取指定状态的商品 | |
getQrCodeUrl ( $ticket ) : string | 获取二维码图片 | |
getShelf ( $shelfId ) : array | boolean | 根据货架ID获取货架信息 | |
getShelfList ( ) : array | boolean | 获取所有货架 | |
getShopGroup ( integer $groupId ) : array | boolean | 根据分组ID获取分组信息 | |
getShopGroupList ( ) : array | boolean | 获取所有分组 | |
getSnsMemberInfo ( $openId, string $oauth2AccessToken, string $lang = 'zh_CN' ) : array | boolean | 如果网页授权作用域为snsapi_userinfo,则此时开发者可以通过网页授权后的access_token和openid拉取用户信息了。 | |
httpGet ( $url, null $params = null ) : array | Get方式调用微信接口 | |
httpPost ( $url, null $params = null ) : array | Post方式调用微信接口 | |
httpRaw ( $url, null $params = null ) : array | Post方式发送raw包调用微信接口 | |
init ( ) | ||
jsApiConfig ( array $config = [], boolean $debug = YII_DEBUG ) : array | 生成js 必要的config 只需在视图文件输出JS代码: wx.config(jsApiConfig()) ?>); // 默认全权限 wx.config(jsApiConfig([ // 只允许使用分享到朋友圈功能 'jsApiList' => [ 'onMenuShareTimeline' ] ])) ?>); | |
modifyCardStock ( $card_id, integer $increase_stock_value, integer $reduce_stock_value ) : boolean | 修改卡券的库存 | |
parseRequestData ( srting $xml = null ) : array | 解析微信服务器请求的xml数据 | |
reduceProductStock ( $productId, $quantity, array $skuInfo = null ) : boolean | 减少库存 | |
refreshOauth2AccessToken ( $refreshToken, string $grantType = 'refresh_token' ) : array | boolean | 网页授权获取用户信息:第三步(非必须) 由于access_token拥有较短的有效期,当access_token超时后,可以使用refresh_token进行刷新,refresh_token拥有较长的有效期(7天、30天、60天、90天),当refresh_token失效的后,需要用户重新授权。 | |
sendArticles ( array $target, $content, string $type ) : array | boolean | 群发消息 | |
sendImage ( string $openId, string $mediaId ) : boolean | 发送图片客服消息 | |
sendMusic ( $openId, $thumbMediaId, $musicUrl, $hqMusicUrl, null $title = null, null $description = null ) : boolean | 发送音乐客服消息 | |
sendNews ( $openId, array $articles ) : boolean | 发送图文客服消息 | |
sendTemplateMessage ( $toUser, $templateId, array $data ) : integer | boolean | 发送模板消息给关注者 示例数据 [ "touser" => "接收消息的用户openid", "template_id" => "模板id", "url" => "http://weixin.qq.com/download", "topcolor" => "#FF0000", "data" => [ "first" => [ "value" => "恭喜你购买成功!", "color" => "#173177" ], "product" => [ "value" => "巧克力", "color" => "#173177" ], "price" => [ "value" => "39.8元", "color" => "#173177" ], "time" => [ "value" => "2014年9月16日", "color" => "#173177" ], "remark" => [ "value" => "欢迎再次购买!", "color" => "#173177" ] ] | |
sendText ( $openId, $content ) : boolean | 发送文本客服信息 | |
sendVideo ( string $openId, string $mediaId, string $thumbMediaId, string $title = null, string $description = null ) : boolean | 发送视频客服信息 | |
sendVoice ( string $openId, string $mediaId ) : boolean | 发送声音客服消息 | |
setAccessToken ( array $data ) | 设置AccessToken | |
setCodeUnavailable ( $code, null $card_id = null ) : boolean | 设置卡券为失效 | |
setJsApiTicket ( array $data ) | 设置jsapi_ticket | |
setOrderDelivery ( $orderId, $deliveryCompany, $deliveryTrackNo ) : boolean | 设置订单发货信息 | |
updateCard ( $requestParams ) : array | boolean | 更新卡券信息 | |
updateCode ( $code, $card_id, $new_code ) : boolean | 更新Code 为确保转赠后的安全性,微信允许自定义code的商户对已下发的code进行更改。 注:为避免用户疑惑,建议仅在发生转赠行为后(发生转赠后,微信会通过事件推送的方式告知商户被转赠的卡券code)对用户的code进行更改。 | |
updateDeliverTemplate ( integer $templateId, array $deliveryTemplate ) : boolean | 修改邮费模板 | |
updateFeedback ( $openId, $feedbackId ) : boolean | 标记客户的投诉处理状态 | |
updateGroupName ( $id, $name ) : boolean | 根据分组ID修改分组名 | |
updateMemberGroup ( $openId, $toGroupId ) : boolean | 修改关注者所在分组 | |
updateMemberRemark ( $openId, $remark ) : boolean | 修改关注者备注 | |
updatePoi ( $requestParams ) : boolean | ||
updateProduct ( $productId, array $data ) : boolean | ||
updateProductStatus ( $productId, $status ) : boolean | 更改商品状态(上下架) | |
updateShelf ( $shelfId, $data ) : boolean | 修改货架 | |
updateShopGroup ( $groupId, $groupName ) : boolean | 修改分组属性 | |
updateShopGroupProduct ( $groupId, array $productList ) : boolean | 修改分组商品 | |
updateUser ( array $requestParams = [] ) : array | boolean | 更新用户信息 | |
uploadArticles ( array $articles ) : array | boolean | 图文消息上传(高级群发接口) | |
uploadMedia ( $filePath, $mediaType ) : array | boolean | 上传媒体文件 | |
uploadShopImage ( $filePath, null $fileName = null ) : boolean | 上传图片(小店接口) | |
uploadStoreLogo ( $filePath ) : boolean | 上传门店LOGO 门店不同于(微店)门店是线下消费场所 | |
uploadVideo ( $mediaId, $title, $description ) : array | boolean | 上传多媒体文件(群发接口) 推送消息时 video信息需另外发送一次. |
Method | Description | |
---|---|---|
getCache ( $name, null $defaultValue = null ) : mixed | 获取微信缓存数据 | |
getCacheKey ( $name ) : string | 获取缓存的键值 | |
http ( $url, $params = null, string $type = 'get' ) : boolean | mixed | Http协议调用微信接口方法 | |
parseHttpResult ( $url, $params, $method, boolean $force = true ) : boolean | mixed | 解析api回调请求 会根据返回结果处理响应的回调结果.如 40001 access_token失效(会强制更新access_token后)重发, 保证请求的的有效 | |
requestAccessToken ( string $grantType = 'client_credential' ) : array | 请求服务器access_token | |
requestJsApiTicket ( string $type = 'jsapi' ) : array | 请求服务器jsapi_ticket | |
sendCustomMessage ( array $data ) : boolean | 发送客服消息 | |
setCache ( $name, $value, null $duration = null ) : boolean | 缓存微信数据 |
public activateMemberCard ( array $requestParams = [] ) : boolean | ||
$requestParams | array | $requestParams = [ "init_bonus" => 100, 初始积分不填为0 "init_balance" => 200, 初始余额不填为0 "bonus_url" => 'www.xxxx.com', 积分查询 "balance_url" => 'www.xxxx.com', 余额查询 "membership_number" => "AAA00000001", 会员卡编号 "code" => "12312313", 创建会员时获得的Code "card_id" => "xxxx_card_id" 卡券id ] |
return | boolean |
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 addProductStock ( $productId, $quantity, array $skuInfo = null ) : boolean | ||
$productId | 商品ID | |
$quantity | 增加的库存数量 | |
$skuInfo | array | sku信息,格式"id1:vid1;id2:vid2",如商品为统一规格,则此处赋值为空字符串即可 |
return | boolean |
public checkOauth2AccessToken ( $accessToken, $openId ) : boolean | ||
$accessToken | ||
$openId | ||
return | boolean |
public closeOrder ( integer $orderId ) : boolean | ||
$orderId | integer | |
return | boolean |
public createCardQrcode ( array $requestParams = [] ) : boolean | string | ||
$requestParams | array | $requestParams = [ 'card_id' => '', (必须) 'code' => '', (当卡券use_custom_code字段为true时必填) 'openid' => '', (当卡券bind_openid字段为true时必填) 'expire_seconds' => 0,(指定二维码有效时间60~1800秒之间,不填默认为永久) 'is_unique_code' => false, (领取是否可再次扫描) 'balance' => 1, (红包余额单位为分) 'outer_id' => 0 (领取场景值) ] |
return | boolean | string | 生成二维码的ticket |
public createGroup ( $name ) : array | boolean | ||
$name | 分组名称 | |
return | array | boolean |
public createMenu ( array $buttons ) : boolean | ||
$buttons | array | 菜单结构字符串 ~~~ $this->createMenu([ [ 'type' => 'click', 'name' => '今日歌曲', 'key' => 'V1001_TODAY_MUSIC' ], [ 'type' => 'view', 'name' => '搜索', 'url' => 'http://www.soso.com' ] ... ]); ~~~ |
return | boolean |
public createProduct ( array $data ) : array | boolean | ||
$data | array | 商品详细信息 ~~~ $data = [ 'product_base' => [ 'category_id' => [537074298], 'property' => [ [ 'id' => 1075741879, 'vid' => 1079749967 ], [ 'id' => 1075754127, 'vid' => 1079795198 ], [ 'id' => 1075777334, 'vid' => 1079837440 ] ], 'name' => 'testaddproduct', 'sku_info' => [ [ 'id' => 1075741873, 'vid' => [1079742386, 1079742363] ] ], 'main_img' => 'http://mmbiz.qpic.cn/mmbiz/4whpV1VZl2iccsvYbHvnphkyGtnvjD3ulEKogfsiaua49pvLfUS8Ym0GSYjViaLic0FD3vN0V8PILcibEGb2fPfEOmw/0', 'img' => ['http://mmbiz.qpic.cn/mmbiz/4whpV1VZl2iccsvYbHvnphkyGtnvjD3ulEKogfsiaua49pvLfUS8Ym0GSYjViaLic0FD3vN0V8PILcibEGb2fPfEOmw/0'], 'detail' => [ [ 'text' => 'test first' ], [ 'img' => 'http://mmbiz.qpic.cn/mmbiz/4whpV1VZl2iccsvYbHvnphkyGtnvjD3ul1UcLcwxrFdwTKYhH9Q5YZoCfX4Ncx655ZK6ibnlibCCErbKQtReySaVA/0' ], [ 'text' => 'test again' ] ], 'buy_limit' => 10 ], 'sku_list' => [ [ 'sku_id' => '1075741873:1079742386', 'price' => 30, 'icon_url' => 'http://mmbiz.qpic.cn/mmbiz/4whpV1VZl28bJj62XgfHPibY3ORKicN1oJ4CcoIr4BMbfA8LqyyjzOZzqrOGz3f5KWq1QGP3fo6TOTSYD3TBQjuw/0', 'product_code' => 'testing', 'ori_price' => 9000000, 'quantity' => 800 ], [ 'sku_id' => '1075741873:1079742363', 'price' => 30, 'icon_url' => 'http://mmbiz.qpic.cn/mmbiz/4whpV1VZl28bJj62XgfHPibY3ORKicN1oJ4CcoIr4BMbfA8LqyyjzOZzqrOGz3f5KWq1QGP3fo6TOTSYD3TBQjuw/0', 'product_code' => 'testingtesting', 'ori_price' => 9000000, 'quantity' => 800, ] ], 'attrext' => [ 'location' => [ 'country' => '中国', 'province' => '广东省', 'city' => '广州市', 'address' => 'T.I.T创意园', ], 'isPostFree' => 0, 'isHasReceipt' => 1, 'isUnderGuaranty' => 0, 'isSupportReplace' => 0, ], 'delivery_info' => [ 'delivery_type' => 0, 'template_id' => 0, 'express' => [ [ 'id' => 10000027, 'price' => 100, ], [ 'id' => 10000028, 'price' => 100 ], '2' => [ 'id' => 10000029, 'price' => 100 ] ] ] ]; ~~~ |
return | array | boolean |
public createShortUrl ( $longUrl ) : boolean | ||
$longUrl | 需要转换的长链接,支持http://、https://、weixin://wxpay 格式的url | |
return | boolean |
public deleteDeliverTemplate ( integer $templateId ) : boolean | ||
$templateId | integer | 邮费模板ID |
return | boolean |
public deleteProduct ( $productId ) : boolean | ||
$productId | 商品id | |
return | boolean |
public deleteShopGroup ( integer $groupId ) : boolean | ||
$groupId | integer | |
return | boolean |
public getAccessToken ( boolean $force = false ) : string | ||
$force | boolean | 是否强制获取 |
return | string |
public getCategoryProperty ( $cateId ) : array | boolean | ||
$cateId | 分类ID | |
return | array | boolean |
public getCategorySkuList ( $cateId ) : array | boolean | ||
$cateId | 分类ID | |
return | array | boolean |
public getCategorySubCategory ( $cateId ) : array | boolean | ||
return | array | boolean |
public getCustomerServiceRecords ( string $openId, integer $startTime, integer $endTime, integer $pageIndex = 1, integer $pageSize = 1000 ) : array | boolean | ||
$openId | string | 关注者的openID |
$startTime | integer | 查询开始时间,UNIX时间戳 |
$endTime | integer | 查询结束时间,UNIX时间戳,每次查询不能跨日查询 |
$pageIndex | integer | 每页大小,每页最多拉取1000条 |
$pageSize | integer | 查询第几页,默认从1开始 |
return | array | boolean |
public getDecryptCode ( $encrypt_code ) : boolean | ||
$encrypt_code | 通过 choose_card_info 获取的加密字符串 | |
return | boolean |
public getDeliverTemplateList ( ) : array | boolean | ||
return | array | boolean |
public getGroupId ( $openId ) : array | boolean | ||
$openId | 关注者openID | |
return | array | boolean |
public getGroupList ( ) : array | boolean | ||
return | array | boolean |
public getJsApiTicket ( boolean $force = false ) : mixed | ||
$force | boolean | |
return | mixed |
public getOauth2AccessToken ( $code, string $grantType = 'authorization_code' ) : array | ||
$code | ||
$grantType | string | |
return | array |
public getOauth2AuthorizeUrl ( $redirectUrl, string $state = 'authorize', string $scope = 'snsapi_base' ) : string | ||
$redirectUrl | 授权后重定向的回调链接地址,请使用urlencode对链接进行处理 | |
$state | string | 重定向后会带上state参数,开发者可以填写a-zA-Z0-9的参数值 |
$scope | string | 应用授权作用域,snsapi_base (不弹出授权页面,直接跳转,只能获取用户openid), snsapi_userinfo (弹出授权页面,可通过openid拿到昵称、性别、所在地。并且,即使在未关注的情况下,只要用户授权,也能获取其信息) |
return | string |
public getOrderByFilter ( array $condition ) : boolean | ||
$condition | array | ~~~ $condition = [ 'status' => 2, // 订单状态(不带该字段-全部状态, 2-待发货, 3-已发货, 5-已完成, 8-维权中, ) 'begintime' => 1397130460, // 订单创建时间起始时间(不带该字段则不按照时间做筛选) 'endtime' => 1397130470 // 订单创建时间终止时间(不带该字段则不按照时间做筛选) ]; ~~~ |
return | boolean |
public getProduct ( $productId ) : array | boolean | ||
$productId | ||
return | array | boolean |
public getProductByStatus ( $status ) : array | boolean | ||
$status | 商品状态(0-全部, 1-上架, 2-下架) | |
return | array | boolean |
public getQrCodeUrl ( $ticket ) : string | ||
$ticket | 获取的二维码ticket,凭借此ticket可以在有效时间内换取二维码。 | |
return | string |
public getShelfList ( ) : array | boolean | ||
return | array | boolean |
public getShopGroupList ( ) : array | boolean | ||
return | array | boolean |
public parseRequestData ( srting $xml = null ) : array | ||
$xml | srting | 服务发送的xml数据 |
return | array |
public reduceProductStock ( $productId, $quantity, array $skuInfo = null ) : boolean | ||
$productId | 商品ID | |
$quantity | 增加的库存数量 | |
$skuInfo | array | sku信息,格式"id1:vid1;id2:vid2",如商品为统一规格,则此处赋值为空字符串即可 |
return | boolean |
protected requestAccessToken ( string $grantType = 'client_credential' ) : array | ||
$grantType | string | |
return | array |
protected requestJsApiTicket ( string $type = 'jsapi' ) : array | ||
$type | string | |
return | array |
public sendArticles ( array $target, $content, string $type ) : array | boolean | ||
$target | array | 发送对象 groupid 或 openid ~~~ $target = [ 'filter' => [ 'group_id' => 'groupId', ] ]; //OR $target = [ 'touser' => [ 'openId1', 'openId2', 'openId3', ] ]; ~~~ |
$content | 发送内容 (发送多媒体只需发送media_id) | |
$type | string | 发送类型text, mpnews, voice, image, mpvideo(发送给指定群组), video(发送给指定关注者) |
return | array | boolean |
protected sendCustomMessage ( array $data ) : boolean | ||
$data | array | |
return | boolean |
public setOrderDelivery ( $orderId, $deliveryCompany, $deliveryTrackNo ) : boolean | ||
$orderId | 订单ID | |
$deliveryCompany | 物流公司ID 邮政EMS Fsearch_code 申通快递 002shentong 中通速递 066zhongtong 圆通速递 056yuantong 天天快递 042tiantian 顺丰速运 003shunfeng 韵达快运 059Yunda 宅急送 064zhaijisong 汇通快运 020huitong 易迅快递 zj001yixun | |
$deliveryTrackNo | 运单ID | |
return | boolean |
public updateCard ( $requestParams ) : array | boolean | ||
$requestParams | ||
return | array | boolean |
public updateCode ( $code, $card_id, $new_code ) : boolean | ||
$code | ||
$card_id | ||
$new_code | ||
return | boolean |
public updateFeedback ( $openId, $feedbackId ) : boolean | ||
$openId | 关注者openID | |
$feedbackId | 客户投诉对应的单号 | |
return | boolean |
public updateGroupName ( $id, $name ) : boolean | ||
$id | 分组的ID | |
$name | 修改后的分组名 | |
return | boolean |
public updateMemberGroup ( $openId, $toGroupId ) : boolean | ||
$openId | 关注者openID | |
$toGroupId | 分组ID | |
return | boolean |
public updateMemberRemark ( $openId, $remark ) : boolean | ||
$openId | 关注者openID | |
$remark | 备注内容 | |
return | boolean |
public updatePoi ( $requestParams ) : boolean | ||
$requestParams | $requestParams = [ 'business' => [ 'base_info' => [ 'poi_id' => '271864249', 商户自己的门店ID, 'telephone' => '020-12008888', 门店电话 '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 updateProduct ( $productId, array $data ) : boolean | ||
$productId | ||
$data | array | |
return | boolean |
public updateProductStatus ( $productId, $status ) : boolean | ||
$productId | ||
$status | 商品状态(0-全部, 1-上架, 2-下架) | |
return | boolean |
public updateShelf ( $shelfId, $data ) : boolean | ||
$shelfId | ||
$data | ||
return | boolean |
public updateShopGroup ( $groupId, $groupName ) : boolean | ||
$groupId | ||
$groupName | ||
return | boolean |
public updateShopGroupProduct ( $groupId, array $productList ) : boolean | ||
$groupId | ||
$productList | array | 分组的商品集合 |
return | boolean |
public updateUser ( array $requestParams = [] ) : array | boolean | ||
$requestParams | array | $requestParams = [ 'code' => '12312313', 要消耗的序列号 'card_id' => 'p1Pj9jr90', 要消耗序列的所属卡券ID 'record_bonus' => '消费30元,获得3积分', 商家自定义积分记录 'add_bonus' => 3, 需要变更的积分 'add_balance' => -3000, 要变更的余额 'record_balance' => '购买焦糖玛琪朵一杯,扣除金额30元' 商家自定义金额记录 ] |
return | array | boolean |
public uploadArticles ( array $articles ) : array | boolean | ||
$articles | array | ~~~ $articles = [ [ 'thumb_media_id' => 'qI6_Ze_6PtV7svjolgs-rN6stStuHIjs9_DidOHaj0Q-mwvBelOXCFZiq2OsIU-p', 'author' => 'xxx', 'title' => 'Happy Day', 'content_source_url' => 'www.qq.com', 'content' => 'content', 'digest' => 'digest', 'show_cover_pic' => '1' ] ... ]; ~~~ |
return | array | boolean |
public uploadMedia ( $filePath, $mediaType ) : array | boolean | ||
$filePath | 媒体文件路径 | |
$mediaType | 媒体文件类型, 分别有图片(image)、语音(voice)、视频(video)和缩略图(thumb,主要用于视频与音乐格式的缩略图) 图片(image): 1M,支持JPG格式 语音(voice):2M,播放长度不超过60s,支持AMR\MP3格式 视频(video):10MB,支持MP4格式 缩略图(thumb):64KB,支持JPG格式 | |
return | array | boolean |
public uploadShopImage ( $filePath, null $fileName = null ) : boolean | ||
$filePath | 文件完整路径 | |
$fileName | null | 文件名 如不填写.则使用文件路径里的名称 |
return | boolean |
public uploadStoreLogo ( $filePath ) : boolean | ||
$filePath | 文件完整路径 | |
return | boolean |
public uploadVideo ( $mediaId, $title, $description ) : array | boolean | ||
$mediaId | 媒体id | |
$title | 媒体文件的标题 | |
$description | 媒体文件的描述 | |
return | array | boolean |
public $paySignKey |