-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
582c0ee
commit e1f1705
Showing
13 changed files
with
825 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
get: | ||
x-base-uri: https://payapp.mch.weixin.qq.com/ | ||
x-last-updated-at: 2021.11.10 | ||
tags: | ||
- APIv2∙实名校验 | ||
summary: 通过code换取accesstoken | ||
description: 使用标准OAuth2.0协议接入微信支付,在用户授权的条件下,将可以做到访问用户资源,使用接口调用用户功能(如获取用户实名信息等 [官方文档](https://pay.weixin.qq.com/wiki/doc/api/realnameauth.php?chapter=60_1&index=2) | ||
consumes: | ||
- application/xml | ||
produces: | ||
- application/xml | ||
parameters: | ||
- name: mch_id | ||
in: query | ||
type: string | ||
required: true | ||
description: 商户号 | ||
example: '1230000109' | ||
- name: appid | ||
in: query | ||
type: string | ||
required: true | ||
description: 应用ID | ||
example: wxd678efh567hg6787 | ||
- name: redirect_uri | ||
in: query | ||
type: string | ||
required: true | ||
description: 重定向地址,需要urlencode,需在支付安全域下(商户平台上配置“支付授权目录”)。 | ||
example: https://weixin.qq.com/i-am-a-fake-uri | ||
- name: response_type | ||
in: query | ||
type: string | ||
required: true | ||
description: 固定填`code` | ||
example: code | ||
enum: | ||
- code | ||
- name: scope | ||
in: query | ||
type: string | ||
required: true | ||
description: 应用授权作用域 | ||
example: pay_identity | ||
enum: | ||
- pay_identity | ||
- pay_realname | ||
- name: state | ||
in: query | ||
type: string | ||
required: true | ||
description: 随机字符串,回调时将带上该参数 | ||
example: STATE | ||
responses: | ||
'302': | ||
schema: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
get: | ||
x-last-updated-at: 2021.11.10 | ||
tags: | ||
- APIv2∙实名校验 | ||
summary: 通过code换取accesstoken | ||
description: 获取微信用户的授权, 需要使用微信支付提供的 OAuth2.0 服务.用授权小程序得到的授权码调用OAuth2.0接口access_token. [官方文档](https://pay.weixin.qq.com/wiki/doc/api/realnameauth.php?chapter=60_2&index=3) | ||
consumes: | ||
- application/xml | ||
produces: | ||
- application/json | ||
parameters: | ||
- name: mch_id | ||
in: query | ||
type: string | ||
required: true | ||
description: 商户号 | ||
example: '1200009811' | ||
- name: appid | ||
in: query | ||
type: string | ||
required: true | ||
description: 应用ID | ||
example: wxcbda96de0b165486 | ||
- name: openid | ||
in: query | ||
type: string | ||
required: true | ||
description: 微信openID | ||
example: baf04e6bbbd06f7b1a197d18ed53b7f1 | ||
- name: code | ||
in: query | ||
type: string | ||
required: true | ||
description: 第一步返回的auth_code | ||
example: wxcbda96de0b165489 | ||
- name: grant_type | ||
in: query | ||
type: string | ||
required: true | ||
description: 固定值`authorization_code` | ||
example: 'authorization_code' | ||
enum: | ||
- authorization_code | ||
- name: scope | ||
in: query | ||
type: string | ||
required: true | ||
description: 应用授权作用域 | ||
example: 'pay_identity' | ||
enum: | ||
- pay_identity | ||
- name: sign_type | ||
in: query | ||
type: string | ||
required: true | ||
description: 签名类型 | ||
example: HMAC-SHA256 | ||
enum: | ||
- HMAC-SHA256 | ||
- name: sign | ||
in: query | ||
required: true | ||
type: string | ||
description: 签名 | ||
example: C380BEC2BFD727A4B6845133519F3AD6 | ||
responses: | ||
'200': | ||
schema: | ||
allOf: | ||
- type: object | ||
required: | ||
- retcode | ||
- retmsg | ||
properties: | ||
retcode: | ||
type: number | ||
description: 返回状态码 | ||
example: 0 | ||
enum: | ||
- 0 | ||
- -1 | ||
retmsg: | ||
type: string | ||
description: 处理成功,返回ok | ||
example: OK | ||
- type: object | ||
required: | ||
- access_token | ||
- access_token_expire_in | ||
- refresh_token | ||
- refresh_token_expire_in | ||
- retmsg | ||
properties: | ||
access_token: | ||
type: string | ||
description: 接口调用凭证 | ||
access_token_expire_in: | ||
type: integer | ||
format: int32 | ||
description: 请求返回的access_token过期时间,以秒为单位,有效期较短 | ||
refresh_token: | ||
type: string | ||
description: refresh令牌 | ||
refresh_token_expire_in: | ||
type: number | ||
format: int32 | ||
description: refresh_token过期时间,以秒为单位,有效期较长 |
Oops, something went wrong.