Skip to content

查询签约关系

查询签约关系接口提供单笔签约关系查询。

请求参数类型描述
noncelesstrue声明请求的XML无随机字符串参数
xmlobject声明请求的XML数据结构
appidstring应用ID
mch_idstring商户号
sub_appidstring子商户应用ID
sub_mch_idstring子商户号
contract_idstring委托代扣协议id
plan_idstring模板id
contract_codestring签约协议号
versionstring版本号
1.0 枚举值
php
$instance->v2->papay->partner->querycontract->postAsync([
  'nonceless' => true,
  'xml' => [
    'appid'         => 'wxcbda96de0b165486',
    'mch_id'        => '1200009811',
    'sub_appid'     => 'wxcbda96de0b165489',
    'sub_mch_id'    => '1900000109',
    'contract_id'   => '100005698',
    'plan_id'       => '123',
    'contract_code' => '1023658866',
    'version'       => '1.0',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance->chain('v2/papay/partner/querycontract')->postAsync([
  'nonceless' => true,
  'xml' => [
    'appid'         => 'wxcbda96de0b165486',
    'mch_id'        => '1200009811',
    'sub_appid'     => 'wxcbda96de0b165489',
    'sub_mch_id'    => '1900000109',
    'contract_id'   => '100005698',
    'plan_id'       => '123',
    'contract_code' => '1023658866',
    'version'       => '1.0',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance['v2/papay/partner/querycontract']->postAsync([
  'nonceless' => true,
  'xml' => [
    'appid'         => 'wxcbda96de0b165486',
    'mch_id'        => '1200009811',
    'sub_appid'     => 'wxcbda96de0b165489',
    'sub_mch_id'    => '1900000109',
    'contract_id'   => '100005698',
    'plan_id'       => '123',
    'contract_code' => '1023658866',
    'version'       => '1.0',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$response = $instance->v2->papay->partner->querycontract->post([
  'nonceless' => true,
  'xml' => [
    'appid'         => 'wxcbda96de0b165486',
    'mch_id'        => '1200009811',
    'sub_appid'     => 'wxcbda96de0b165489',
    'sub_mch_id'    => '1900000109',
    'contract_id'   => '100005698',
    'plan_id'       => '123',
    'contract_code' => '1023658866',
    'version'       => '1.0',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/papay/partner/querycontract')->post([
  'nonceless' => true,
  'xml' => [
    'appid'         => 'wxcbda96de0b165486',
    'mch_id'        => '1200009811',
    'sub_appid'     => 'wxcbda96de0b165489',
    'sub_mch_id'    => '1900000109',
    'contract_id'   => '100005698',
    'plan_id'       => '123',
    'contract_code' => '1023658866',
    'version'       => '1.0',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/papay/partner/querycontract']->post([
  'nonceless' => true,
  'xml' => [
    'appid'         => 'wxcbda96de0b165486',
    'mch_id'        => '1200009811',
    'sub_appid'     => 'wxcbda96de0b165489',
    'sub_mch_id'    => '1900000109',
    'contract_id'   => '100005698',
    'plan_id'       => '123',
    'contract_code' => '1023658866',
    'version'       => '1.0',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典类型描述
return_codestring返回状态码
SUCCESS | FAIL 枚举值之一
return_msgstring返回信息
result_codestring业务结果
SUCCESS | FAIL 枚举值之一
mch_idinteger商户号
appidstring公众账号id
contract_idstring委托代扣协议id
plan_idinteger模板id
contract_codestring签约协议号
contract_display_accountstring用户账户展示名称
contract_stateinteger协议状态
contract_signed_timestring协议签署时间
contract_expired_timestring协议到期时间
contract_terminated_timestring协议解约时间
contract_termination_modeinteger协议解约方式
signstring签名
contract_termination_remarkstring解约备注
openidstring用户标识
err_codestring错误代码
err_code_desstring错误代码描述
sub_appidstring子商户公众账号ID
sub_mch_idstring子商户号

参阅 官方文档

Published on the GitHub by TheNorthMemory