服务关联预授权
模式一:在刷掌原生小程序完成开通刷掌服务后,继续授权商家刷掌服务,跳转到商家侧,触发商家调用预授权;模式二:商家主动发起授权,先调用预授权接口,再跳转刷掌小程序
🔰
微信刷掌服务目前正在逐步推广中,暂不支持开放接入。如有合作意愿,请联系行业的运营经理沟通。
请求参数 | 类型 | 描述 |
---|---|---|
json | object | 声明请求的JSON 数据结构 |
openid | string | OpenID |
preauthorize_session_id | string | 预授权会话ID |
organization_id | string | 机构ID |
php
$instance->v3->palmservice->authorization->preauthorize->postAsync([
'json' => [
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'preauthorize_session_id' => '181167098309019291163',
'organization_id' => '1004',
],
])
->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
2
3
4
5
6
7
8
9
10
11
php
$instance->chain('v3/palmservice/authorization/preauthorize')->postAsync([
'json' => [
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'preauthorize_session_id' => '181167098309019291163',
'organization_id' => '1004',
],
])
->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
2
3
4
5
6
7
8
9
10
11
php
$instance['v3/palmservice/authorization/preauthorize']->postAsync([
'json' => [
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'preauthorize_session_id' => '181167098309019291163',
'organization_id' => '1004',
],
])
->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
2
3
4
5
6
7
8
9
10
11
php
$response = $instance->v3->palmservice->authorization->preauthorize->post([
'json' => [
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'preauthorize_session_id' => '181167098309019291163',
'organization_id' => '1004',
],
]);
print_r(json_decode((string) $response->getBody(), true));
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
php
$response = $instance->chain('v3/palmservice/authorization/preauthorize')->post([
'json' => [
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'preauthorize_session_id' => '181167098309019291163',
'organization_id' => '1004',
],
]);
print_r(json_decode((string) $response->getBody(), true));
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
php
$response = $instance['v3/palmservice/authorization/preauthorize']->post([
'json' => [
'openid' => 'oUpF8uMuAJO_M2pxb1Q9zNjWeS6o',
'preauthorize_session_id' => '181167098309019291163',
'organization_id' => '1004',
],
]);
print_r(json_decode((string) $response->getBody(), true));
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
返回字典 | 类型 | 描述 |
---|---|---|
permission_token | string | 预授权token |
参阅 官方文档