Skip to content

查询微工卡授权关系

查询商户和微信支付用户的微工卡授权关系

请求参数类型描述
openidstring用户标识
queryobject声明请求的查询参数
sub_mchidstring子商户号
appidstring应用ID
sub_appidstring子商户应用ID
php
$instance->v3->payrollCard->relations->_openid_->getAsync([
  'openid' => '9x111111',
  'query' => [
    'sub_mchid' => '1111111',
    'appid'     => 'wxa1111111',
    'sub_appid' => 'wxa1111111',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/payroll-card/relations/{openid}')->getAsync([
  'openid' => '9x111111',
  'query' => [
    'sub_mchid' => '1111111',
    'appid'     => 'wxa1111111',
    'sub_appid' => 'wxa1111111',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/payroll-card/relations/{openid}']->getAsync([
  'openid' => '9x111111',
  'query' => [
    'sub_mchid' => '1111111',
    'appid'     => 'wxa1111111',
    'sub_appid' => 'wxa1111111',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->payrollCard->relations->_openid_->get([
  'openid' => '9x111111',
  'query' => [
    'sub_mchid' => '1111111',
    'appid'     => 'wxa1111111',
    'sub_appid' => 'wxa1111111',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/payroll-card/relations/{openid}')->get([
  'openid' => '9x111111',
  'query' => [
    'sub_mchid' => '1111111',
    'appid'     => 'wxa1111111',
    'sub_appid' => 'wxa1111111',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/payroll-card/relations/{openid}']->get([
  'openid' => '9x111111',
  'query' => [
    'sub_mchid' => '1111111',
    'appid'     => 'wxa1111111',
    'sub_appid' => 'wxa1111111',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
openidstring用户标识
mchidstring商户号
sub_mchidstring子商户号
authorize_statestring授权状态
UNAUTHORIZED | AUTHORIZED | DEAUTHORIZED 枚举值之一
authorize_timestring授权时间
deauthorize_timestring取消授权时间

参阅 官方文档

Published on the GitHub by TheNorthMemory