从业机构预授权
从业机构预授权
请求参数 | 类型 | 描述 |
---|---|---|
json | object | 声明请求的JSON 数据结构 |
service_id | string | 服务ID |
channel_id | string | 渠道商商户号 |
appid | string | 服务商应用ID |
sub_appid | string | 子商户应用ID |
sub_mchid | string | 子商户号 |
authorization_code | string | 授权协议号 |
notify_url | string | 商户回调地址 |
php
$instance->v3->payscore->acquiringbank->permissions->postAsync([
'json' => [
'service_id' => 'service_id',
'channel_id' => '1230000109',
'appid' => 'wxd678efh567hg6787',
'sub_appid' => 'wxd678efh567hg6787',
'sub_mchid' => '1230000109',
'authorization_code' => '1234323JKHDFE1243252',
'notify_url' => 'http://www.qq.com',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
php
$instance->chain('v3/payscore/acquiringbank/permissions')->postAsync([
'json' => [
'service_id' => 'service_id',
'channel_id' => '1230000109',
'appid' => 'wxd678efh567hg6787',
'sub_appid' => 'wxd678efh567hg6787',
'sub_mchid' => '1230000109',
'authorization_code' => '1234323JKHDFE1243252',
'notify_url' => 'http://www.qq.com',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
php
$instance['v3/payscore/acquiringbank/permissions']->postAsync([
'json' => [
'service_id' => 'service_id',
'channel_id' => '1230000109',
'appid' => 'wxd678efh567hg6787',
'sub_appid' => 'wxd678efh567hg6787',
'sub_mchid' => '1230000109',
'authorization_code' => '1234323JKHDFE1243252',
'notify_url' => 'http://www.qq.com',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
php
$response = $instance->v3->payscore->acquiringbank->permissions->post([
'json' => [
'service_id' => 'service_id',
'channel_id' => '1230000109',
'appid' => 'wxd678efh567hg6787',
'sub_appid' => 'wxd678efh567hg6787',
'sub_mchid' => '1230000109',
'authorization_code' => '1234323JKHDFE1243252',
'notify_url' => 'http://www.qq.com',
],
]);
print_r(json_decode((string) $response->getBody(), true));
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
php
$response = $instance->chain('v3/payscore/acquiringbank/permissions')->post([
'json' => [
'service_id' => 'service_id',
'channel_id' => '1230000109',
'appid' => 'wxd678efh567hg6787',
'sub_appid' => 'wxd678efh567hg6787',
'sub_mchid' => '1230000109',
'authorization_code' => '1234323JKHDFE1243252',
'notify_url' => 'http://www.qq.com',
],
]);
print_r(json_decode((string) $response->getBody(), true));
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
php
$response = $instance['v3/payscore/acquiringbank/permissions']->post([
'json' => [
'service_id' => 'service_id',
'channel_id' => '1230000109',
'appid' => 'wxd678efh567hg6787',
'sub_appid' => 'wxd678efh567hg6787',
'sub_mchid' => '1230000109',
'authorization_code' => '1234323JKHDFE1243252',
'notify_url' => 'http://www.qq.com',
],
]);
print_r(json_decode((string) $response->getBody(), true));
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
返回字典 | 类型 | 描述 |
---|---|---|
apply_permissions_token | string | 预授权token |
参阅 官方文档