Skip to content

公众号纯签约

商户可以通过请求此接口唤起微信委托代扣的页面。

请求参数类型描述
queryobject声明请求的查询参数
appidstring应用ID
mch_idstring商户号
sub_appidstring子商户应用ID
sub_mch_idstring子商户号
plan_idinteger模板id
contract_codestring签约协议号
request_serialinteger请求序列号
contract_display_accountstring用户账户展示名称
notify_urlstring回调通知url
versionstring版本号
1.0 枚举值
signstring签名
timestampstring时间戳
return_webinteger返回web
1 枚举值
php
$instance->v2->pay->partner->entrustweb->getAsync([
  'query' => [
    'appid'                    => 'wxcbda96de0b165486',
    'mch_id'                   => '1200009811',
    'sub_appid'                => 'wxcbda96de0b165489',
    'sub_mch_id'               => '1900000109',
    'plan_id'                  => '12535',
    'contract_code'            => '100000',
    'request_serial'           => '1000',
    'contract_display_account' => '微信代扣',
    'notify_url'               => 'https://weixin.qq.com',
    'version'                  => '1.0',
    'sign'                     => 'C380BEC2BFD727A4B6845133519F3AD6',
    'timestamp'                => '1414488825',
    'return_web'               => '1',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance->chain('v2/pay/partner/entrustweb')->getAsync([
  'query' => [
    'appid'                    => 'wxcbda96de0b165486',
    'mch_id'                   => '1200009811',
    'sub_appid'                => 'wxcbda96de0b165489',
    'sub_mch_id'               => '1900000109',
    'plan_id'                  => '12535',
    'contract_code'            => '100000',
    'request_serial'           => '1000',
    'contract_display_account' => '微信代扣',
    'notify_url'               => 'https://weixin.qq.com',
    'version'                  => '1.0',
    'sign'                     => 'C380BEC2BFD727A4B6845133519F3AD6',
    'timestamp'                => '1414488825',
    'return_web'               => '1',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance['v2/pay/partner/entrustweb']->getAsync([
  'query' => [
    'appid'                    => 'wxcbda96de0b165486',
    'mch_id'                   => '1200009811',
    'sub_appid'                => 'wxcbda96de0b165489',
    'sub_mch_id'               => '1900000109',
    'plan_id'                  => '12535',
    'contract_code'            => '100000',
    'request_serial'           => '1000',
    'contract_display_account' => '微信代扣',
    'notify_url'               => 'https://weixin.qq.com',
    'version'                  => '1.0',
    'sign'                     => 'C380BEC2BFD727A4B6845133519F3AD6',
    'timestamp'                => '1414488825',
    'return_web'               => '1',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$response = $instance->v2->pay->partner->entrustweb->get([
  'query' => [
    'appid'                    => 'wxcbda96de0b165486',
    'mch_id'                   => '1200009811',
    'sub_appid'                => 'wxcbda96de0b165489',
    'sub_mch_id'               => '1900000109',
    'plan_id'                  => '12535',
    'contract_code'            => '100000',
    'request_serial'           => '1000',
    'contract_display_account' => '微信代扣',
    'notify_url'               => 'https://weixin.qq.com',
    'version'                  => '1.0',
    'sign'                     => 'C380BEC2BFD727A4B6845133519F3AD6',
    'timestamp'                => '1414488825',
    'return_web'               => '1',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/pay/partner/entrustweb')->get([
  'query' => [
    'appid'                    => 'wxcbda96de0b165486',
    'mch_id'                   => '1200009811',
    'sub_appid'                => 'wxcbda96de0b165489',
    'sub_mch_id'               => '1900000109',
    'plan_id'                  => '12535',
    'contract_code'            => '100000',
    'request_serial'           => '1000',
    'contract_display_account' => '微信代扣',
    'notify_url'               => 'https://weixin.qq.com',
    'version'                  => '1.0',
    'sign'                     => 'C380BEC2BFD727A4B6845133519F3AD6',
    'timestamp'                => '1414488825',
    'return_web'               => '1',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/pay/partner/entrustweb']->get([
  'query' => [
    'appid'                    => 'wxcbda96de0b165486',
    'mch_id'                   => '1200009811',
    'sub_appid'                => 'wxcbda96de0b165489',
    'sub_mch_id'               => '1900000109',
    'plan_id'                  => '12535',
    'contract_code'            => '100000',
    'request_serial'           => '1000',
    'contract_display_account' => '微信代扣',
    'notify_url'               => 'https://weixin.qq.com',
    'version'                  => '1.0',
    'sign'                     => 'C380BEC2BFD727A4B6845133519F3AD6',
    'timestamp'                => '1414488825',
    'return_web'               => '1',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典类型描述

参阅 官方文档

Published on the GitHub by TheNorthMemory