Skip to content

查询用户服务可用信息

请求参数类型描述
contract_idstring签约成功后,微信返回代扣签约ID
queryobject声明请求的查询参数
appidstring商户在微信申请公众号或移动应用成功后分配的账号ID
sub_appidstring子公众账号ID
sub_mchidstring微信支付分配的子商户号
php
$instance->v3->qrcode->userServices->contractId->_contract_id_->getAsync([
  'contract_id' => 'Wx15463511252015071056489715',
  'query' => [
    'appid'     => 'wxcbda96de0b165486',
    'sub_appid' => 'wxcbda96de0b165486',
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/qrcode/user-services/contract-id/{contract_id}')->getAsync([
  'contract_id' => 'Wx15463511252015071056489715',
  'query' => [
    'appid'     => 'wxcbda96de0b165486',
    'sub_appid' => 'wxcbda96de0b165486',
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/qrcode/user-services/contract-id/{contract_id}']->getAsync([
  'contract_id' => 'Wx15463511252015071056489715',
  'query' => [
    'appid'     => 'wxcbda96de0b165486',
    'sub_appid' => 'wxcbda96de0b165486',
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->qrcode->userServices->contractId->_contract_id_->get([
  'contract_id' => 'Wx15463511252015071056489715',
  'query' => [
    'appid'     => 'wxcbda96de0b165486',
    'sub_appid' => 'wxcbda96de0b165486',
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/qrcode/user-services/contract-id/{contract_id}')->get([
  'contract_id' => 'Wx15463511252015071056489715',
  'query' => [
    'appid'     => 'wxcbda96de0b165486',
    'sub_appid' => 'wxcbda96de0b165486',
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/qrcode/user-services/contract-id/{contract_id}']->get([
  'contract_id' => 'Wx15463511252015071056489715',
  'query' => [
    'appid'     => 'wxcbda96de0b165486',
    'sub_appid' => 'wxcbda96de0b165486',
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
contract_idstring签约成功后,微信返回代扣签约ID
user_service_statestringNORMAL | BLOCKED 枚举值之一
block_reasonstring原因

参阅 务

Published on the GitHub by TheNorthMemory