Skip to content

通过微信用户标识查询用户信息

该接口用于获取微信支付集星光用户信息。合作方可根据该用户信息判断该用户是否为学生身份。

请求参数类型描述
wechat_openidstring用户在appid下的唯一标识
queryobject声明请求的查询参数
appidstring商户appid
php
$instance->v3->eduStar->users->openid->_wechat_openid_->getAsync([
  'wechat_openid' => 'oUpF8uMuAJOM2pxb1Q',
  'query' => [
    'appid' => 'wx998877665544wx',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/edu-star/users/openid/{wechat_openid}')->getAsync([
  'wechat_openid' => 'oUpF8uMuAJOM2pxb1Q',
  'query' => [
    'appid' => 'wx998877665544wx',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/edu-star/users/openid/{wechat_openid}']->getAsync([
  'wechat_openid' => 'oUpF8uMuAJOM2pxb1Q',
  'query' => [
    'appid' => 'wx998877665544wx',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->eduStar->users->openid->_wechat_openid_->get([
  'wechat_openid' => 'oUpF8uMuAJOM2pxb1Q',
  'query' => [
    'appid' => 'wx998877665544wx',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/edu-star/users/openid/{wechat_openid}')->get([
  'wechat_openid' => 'oUpF8uMuAJOM2pxb1Q',
  'query' => [
    'appid' => 'wx998877665544wx',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/edu-star/users/openid/{wechat_openid}']->get([
  'wechat_openid' => 'oUpF8uMuAJOM2pxb1Q',
  'query' => [
    'appid' => 'wx998877665544wx',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
education_star_studentboolean是否学生
appidstringappid
wechat_openidstring用户在appid下的唯一标识
qqstring用户QQ账号
register_timestring注册时间

参阅 官方流程图

Published on the GitHub by TheNorthMemory