公众号纯签约
商户可以通过请求此接口唤起微信委托代扣的页面。
请求参数 | 类型 | 描述 |
---|---|---|
query | object | 声明请求的查询参数 |
appid | string | 应用ID |
mch_id | string | 商户号 |
sub_appid | string | 子商户应用ID |
sub_mch_id | string | 子商户号 |
plan_id | integer | 模板id |
contract_code | string | 签约协议号 |
request_serial | integer | 请求序列号 |
contract_display_account | string | 用户账户展示名称 |
notify_url | string | 回调通知url |
version | string | 版本号1.0 枚举值 |
sign | string | 签名 |
timestamp | string | 时间戳 |
return_web | integer | 返回web1 枚举值 |
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()));
返回字典 | 类型 | 描述 |
---|
参阅 官方文档