通过用户标识查询签约 
商户通过用户标识+签约模板号来查询用户签约信息,只返回用户在该签约模板下的有效签约(一个签约模板仅会存在一个有效签约);若用户未与该签约模板签约,返回明确错误码
| 请求参数 | 类型 | 描述 | 
|---|---|---|
| openid | string | 服务商APPID下的用户标识 | 
| query | object | 声明请求的查询参数 | 
| appid | string | 服务商APPID | 
| sub_mchid | string | 子商户号 | 
| sub_appid | string | 子商户APPID | 
| sub_openid | string | 子商户APPID下的用户标识 | 
| plan_id | string | 签约模板号 | 
| contract_status | string | 签约状态 ADD|DELETE枚举值之一 | 
| offset | integer | 分页页码 | 
| limit | integer | 分页大小 | 
php
$instance->v3->eduPapay->user->_openid_->contracts->getAsync([
  'openid' => 'oUpF8uMuAJOM2pxb1Q',
  'query' => [
    'appid'           => 'wx8888888888888888',
    'sub_mchid'       => '1900000109',
    'sub_appid'       => 'wx8888888888888888',
    'sub_openid'      => 'oUpF8uMuAJOM2pxb1Q',
    'plan_id'         => '101164396123311331',
    'contract_status' => 'ADD',
    'offset'          => 0,
    'limit'           => 20,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance->chain('v3/edu-papay/user/{openid}/contracts')->getAsync([
  'openid' => 'oUpF8uMuAJOM2pxb1Q',
  'query' => [
    'appid'           => 'wx8888888888888888',
    'sub_mchid'       => '1900000109',
    'sub_appid'       => 'wx8888888888888888',
    'sub_openid'      => 'oUpF8uMuAJOM2pxb1Q',
    'plan_id'         => '101164396123311331',
    'contract_status' => 'ADD',
    'offset'          => 0,
    'limit'           => 20,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance['v3/edu-papay/user/{openid}/contracts']->getAsync([
  'openid' => 'oUpF8uMuAJOM2pxb1Q',
  'query' => [
    'appid'           => 'wx8888888888888888',
    'sub_mchid'       => '1900000109',
    'sub_appid'       => 'wx8888888888888888',
    'sub_openid'      => 'oUpF8uMuAJOM2pxb1Q',
    'plan_id'         => '101164396123311331',
    'contract_status' => 'ADD',
    'offset'          => 0,
    'limit'           => 20,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$response = $instance->v3->eduPapay->user->_openid_->contracts->get([
  'openid' => 'oUpF8uMuAJOM2pxb1Q',
  'query' => [
    'appid'           => 'wx8888888888888888',
    'sub_mchid'       => '1900000109',
    'sub_appid'       => 'wx8888888888888888',
    'sub_openid'      => 'oUpF8uMuAJOM2pxb1Q',
    'plan_id'         => '101164396123311331',
    'contract_status' => 'ADD',
    'offset'          => 0,
    'limit'           => 20,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance->chain('v3/edu-papay/user/{openid}/contracts')->get([
  'openid' => 'oUpF8uMuAJOM2pxb1Q',
  'query' => [
    'appid'           => 'wx8888888888888888',
    'sub_mchid'       => '1900000109',
    'sub_appid'       => 'wx8888888888888888',
    'sub_openid'      => 'oUpF8uMuAJOM2pxb1Q',
    'plan_id'         => '101164396123311331',
    'contract_status' => 'ADD',
    'offset'          => 0,
    'limit'           => 20,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance['v3/edu-papay/user/{openid}/contracts']->get([
  'openid' => 'oUpF8uMuAJOM2pxb1Q',
  'query' => [
    'appid'           => 'wx8888888888888888',
    'sub_mchid'       => '1900000109',
    'sub_appid'       => 'wx8888888888888888',
    'sub_openid'      => 'oUpF8uMuAJOM2pxb1Q',
    'plan_id'         => '101164396123311331',
    'contract_status' => 'ADD',
    'offset'          => 0,
    'limit'           => 20,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));| 返回字典 | 类型 | 描述 | 
|---|---|---|
| data | object[] | 结果集 | 
| sp_mchid | string | 服务商商户号 | 
| appid | string | 服务商APPID | 
| sub_mchid | string | 子商户号 | 
| sub_appid | string | 子商户APPID | 
| openid | string | 服务商APPID下的用户标识 | 
| sub_openid | string | 子商户APPID下的用户标识 | 
| plan_id | string | 签约模板号 | 
| contract_information | object | 签约信息 | 
| contract_id | string | 签约协议号 | 
| contract_status | string | 签约状态 | 
| create_time | string | 签约时间 | 
| total_count | integer | 总数量 | 
| offset | integer | 分页页码 | 
| limit | integer | 分页大小 |