Skip to content

商户预授权

商户预授权

请求参数类型描述
jsonobject声明请求的JSON数据结构
service_idstring服务id
appidstring公众号id
authorization_codestring授权协议号
notify_urlstring通知地址
php
$instance->v3->payscore->permissions->postAsync([
  'json' => [
    'service_id' => '500001',
    'appid' => 'wxd678efh567hg6787',
    '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();
php
$instance->chain('v3/payscore/permissions')->postAsync([
  'json' => [
    'service_id' => '500001',
    'appid' => 'wxd678efh567hg6787',
    '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();
php
$instance['v3/payscore/permissions']->postAsync([
  'json' => [
    'service_id' => '500001',
    'appid' => 'wxd678efh567hg6787',
    '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();
php
$response = $instance->v3->payscore->permissions->post([
  'json' => [
    'service_id' => '500001',
    'appid' => 'wxd678efh567hg6787',
    'authorization_code' => '1234323JKHDFE1243252',
    'notify_url' => 'http://www.qq.com',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/payscore/permissions')->post([
  'json' => [
    'service_id' => '500001',
    'appid' => 'wxd678efh567hg6787',
    'authorization_code' => '1234323JKHDFE1243252',
    'notify_url' => 'http://www.qq.com',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/payscore/permissions']->post([
  'json' => [
    'service_id' => '500001',
    'appid' => 'wxd678efh567hg6787',
    'authorization_code' => '1234323JKHDFE1243252',
    'notify_url' => 'http://www.qq.com',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
apply_permissions_tokenstring预授权token

参阅 官方文档 官方文档

Published on the GitHub by TheNorthMemory