blob: 1aa26308710b3dacf8d16eccda9e88f0b3d84b6c [file] [log] [blame]
Tang Chengcc4299d2020-03-12 15:55:12 +08001components:
2 schemas:
3 ErrorResponse:
4 type: object
5 title: 请求错误
6 required:
7 - message
8 properties:
9 code:
10 type: string
11 title: 错误码
12 message:
13 type: string
14 title: 错误信息
15 QrcodePayInitRequest:
16 type: object
17 title: QrCode请求初始化
18 required:
19 - qrcode
20 - transDate
21 - transTime
22 - shopaccno
23 - billno
24 properties:
25 qrcode:
26 type: string
27 title: QrCode
28 transDate:
29 $ref: 'definitions.yaml#/components/schemas/TransDate'
30 transTime:
31 $ref: 'definitions.yaml#/components/schemas/TransTime'
32 shopaccno:
33 $ref: 'definitions.yaml#/components/schemas/ShopAccNo'
34 billno:
35 $ref: 'definitions.yaml#/components/schemas/Refno'
36 qrcodeFormat:
37 $ref: 'definitions.yaml#/components/schemas/QrcodeFormat'
38
39 QrcodePayInitResponse:
40 type: object
41 title: QrCode请求初始化应答
42 properties:
43 anonymous:
44 title: 是否匿名用户
45 type: boolean
46 userid:
47 title: 用户ID(非匿名)
48 type: string
49 username:
50 title: 用户名(非匿名)
51 type: string
52 sourcetype:
53 title: 支付方式
54 type: string
55 QrcodePayConfirmRequest:
56 type: object
57 title: Qrcode消费确认请求
58 properties:
59 billno:
60 $ref: 'definitions.yaml#/components/schemas/Refno'
61 shopaccno:
62 $ref: 'definitions.yaml#/components/schemas/ShopAccNo'
63 transDate:
64 $ref: 'definitions.yaml#/components/schemas/TransDate'
65 transTime:
66 $ref: 'definitions.yaml#/components/schemas/TransTime'
67 dlttype:
68 type: string
69 title: 交易类型
70 amount:
71 type: integer
72 format: int32
73 title: 交易金额
74 userid:
75 type: string
76 title: 用户ID(非匿名)
77 anonymous:
78 type: boolean
79 title: 是否匿名
80 qrcode:
81 type: string
82 title: QrCode
83 qrcodeFormat:
84 $ref: 'definitions.yaml#/components/schemas/QrcodeFormat'
85 QrcodePayConfirmResponse:
86 type: object
87 title: QrCode消费确认返回
88 properties:
89 refno:
90 $ref: 'definitions.yaml#/components/schemas/Refno'
91 hostDate:
92 $ref: 'definitions.yaml#/components/schemas/TransDate'
93 hostTime:
94 $ref: 'definitions.yaml#/components/schemas/TransTime'
95 description:
96 type: string
97 title: 交易描述
98 result:
99 title: 交易结果
100 type: string
101 enum:
102 - success
103 - require_query
104 - already_success
105 - failed
106
107 paths:
108 qrcodePayInit:
109 parameters:
110 - $ref: definitions.yaml#/components/headers/TenantId
111 post:
112 operationId: qrcodePayInit
113 tags:
114 - pos
115 requestBody:
116 description: QrCode 初始化
117 content:
118 application/json:
119 schema:
120 $ref: '#/components/schemas/QrcodePayInitRequest'
121
122 responses:
123 '200':
124 description: 初始化成功
125 content:
126 application/json:
sijun.life202db2020-03-13 18:54:37 +0800127 schema:
128 $ref: '#/components/schemas/QrcodePayInitResponse'
Tang Chengcc4299d2020-03-12 15:55:12 +0800129 'default':
130 description: 请求错误
131 content:
132 application/json:
133 $ref: '#/components/schemas/ErrorResponse'
134 qrcodePayConfirm:
135 parameters:
136 - $ref: definitions.yaml#/components/headers/TenantId
137 post:
138 operationId: qrcodePayConfirm
139 tags:
140 - pos
141 requestBody:
142 description: Qrcode确认
143 content:
144 application/json:
145 schema:
146 $ref: '#/components/schemas/QrcodePayConfirmRequest'
147 responses:
148 '200':
149 description: 交易成功
150 content:
151 application/json:
sijun.life202db2020-03-13 18:54:37 +0800152 schema:
153 $ref: '#/components/schemas/QrcodePayConfirmResponse'
Tang Chengcc4299d2020-03-12 15:55:12 +0800154 '409':
155 description: 交易正忙,稍后重试
156 content:
157 application/json:
158 $ref: '#/components/schemas/ErrorResponse'
159 'default':
160 description: 交易失败
161 content:
162 application/json:
163 $ref: '#/components/schemas/ErrorResponse'
164 qrcodePayQuery:
165 parameters:
166 - $ref: 'definitions.yaml#/components/headers/TenantId'
167 - name: refno
168 in: path
169 description: 系统交易参考号
170 required: true
171 schema:
172 type: string
173 title: 系统交易参考号
174 get:
175 description: 根据系统交易参考号查询流水状态
176 tags:
177 - pos
178 operationId: qrcodePayQuery
179 responses:
180 '200':
181 description: 查询成功
182 content:
183 application/json:
184 $ref: '#/components/schemas/QrcodePayConfirmResponse'
185 'default':
186 description: 查询失败
187 content:
188 application/json:
189 $ref: '#/components/schemas/ErrorResponse'
190