blob: 7114293f6bc147b6d61706b98e5d89c980359963 [file] [log] [blame]
Tang Chengcc4299d2020-03-12 15:55:12 +08001components:
2 schemas:
Tang Chengcc4299d2020-03-12 15:55:12 +08003 QrcodePayInitRequest:
4 type: object
5 title: QrCode请求初始化
6 required:
7 - qrcode
8 - transDate
9 - transTime
10 - shopaccno
11 - billno
12 properties:
13 qrcode:
14 type: string
15 title: QrCode
16 transDate:
17 $ref: 'definitions.yaml#/components/schemas/TransDate'
18 transTime:
19 $ref: 'definitions.yaml#/components/schemas/TransTime'
20 shopaccno:
21 $ref: 'definitions.yaml#/components/schemas/ShopAccNo'
22 billno:
23 $ref: 'definitions.yaml#/components/schemas/Refno'
24 qrcodeFormat:
25 $ref: 'definitions.yaml#/components/schemas/QrcodeFormat'
26
27 QrcodePayInitResponse:
28 type: object
29 title: QrCode请求初始化应答
30 properties:
31 anonymous:
32 title: 是否匿名用户
33 type: boolean
34 userid:
35 title: 用户ID(非匿名)
36 type: string
37 username:
38 title: 用户名(非匿名)
39 type: string
40 sourcetype:
41 title: 支付方式
42 type: string
43 QrcodePayConfirmRequest:
44 type: object
45 title: Qrcode消费确认请求
46 properties:
47 billno:
48 $ref: 'definitions.yaml#/components/schemas/Refno'
49 shopaccno:
50 $ref: 'definitions.yaml#/components/schemas/ShopAccNo'
51 transDate:
52 $ref: 'definitions.yaml#/components/schemas/TransDate'
53 transTime:
54 $ref: 'definitions.yaml#/components/schemas/TransTime'
sijun.li2da2d5f2020-03-17 17:33:46 +080055 dtltype:
Tang Chengcc4299d2020-03-12 15:55:12 +080056 type: string
57 title: 交易类型
58 amount:
59 type: integer
60 format: int32
61 title: 交易金额
62 userid:
63 type: string
64 title: 用户ID(非匿名)
65 anonymous:
66 type: boolean
67 title: 是否匿名
68 qrcode:
69 type: string
70 title: QrCode
71 qrcodeFormat:
72 $ref: 'definitions.yaml#/components/schemas/QrcodeFormat'
73 QrcodePayConfirmResponse:
74 type: object
75 title: QrCode消费确认返回
76 properties:
77 refno:
78 $ref: 'definitions.yaml#/components/schemas/Refno'
79 hostDate:
80 $ref: 'definitions.yaml#/components/schemas/TransDate'
81 hostTime:
82 $ref: 'definitions.yaml#/components/schemas/TransTime'
83 description:
84 type: string
85 title: 交易描述
86 result:
87 title: 交易结果
Tang Cheng3b2c8202020-03-17 08:45:40 +080088 $ref: 'definitions.yaml#/components/schemas/TransResult'
sijun.li925a8342020-03-20 17:38:41 +080089 amount:
90 type: integer
91 format: int32
92 title: 消费金额
Tang Cheng3b2c8202020-03-17 08:45:40 +080093 RefundRequest:
94 type: object
95 title: 退款申请
96 required:
97 - billno
98 - transDate
99 - transTime
100 - refno
101 - amount
sijun.li925a8342020-03-20 17:38:41 +0800102 - shopaccno
Tang Cheng3b2c8202020-03-17 08:45:40 +0800103 properties:
104 billno:
105 title: 退款申请订单号
106 $ref: 'definitions.yaml#/components/schemas/Refno'
107 transDate:
108 $ref: 'definitions.yaml#/components/schemas/TransDate'
109 transTime:
110 $ref: 'definitions.yaml#/components/schemas/TransTime'
111 refno:
112 title: 退款申请原始订单交易参考号
113 $ref: 'definitions.yaml#/components/schemas/Refno'
sijun.li925a8342020-03-20 17:38:41 +0800114 shopaccno:
115 $ref: 'definitions.yaml#/components/schemas/ShopAccNo'
Tang Cheng3b2c8202020-03-17 08:45:40 +0800116 amount:
117 type: integer
118 title: 退款金额, 正式
119 RefundResponse:
120 type: object
121 title: 退款申请应答
122 properties:
123 billno:
124 title: 退款申请订单号
125 $ref: 'definitions.yaml#/components/schemas/Refno'
126 hostDate:
127 $ref: 'definitions.yaml#/components/schemas/TransDate'
128 hostTime:
129 $ref: 'definitions.yaml#/components/schemas/TransTime'
130 refno:
131 title: 退款申请原始订单交易参考号
132 $ref: 'definitions.yaml#/components/schemas/Refno'
sijun.li925a8342020-03-20 17:38:41 +0800133 refundAmount:
134 type: integer
135 format: int32
136 title: 退款金额
137 leftAmount:
138 type: integer
139 format: int32
140 title: 原流水剩余金额
Tang Cheng3b2c8202020-03-17 08:45:40 +0800141 result:
142 title: 退款处理结果
143 $ref: 'definitions.yaml#/components/schemas/TransResult'
Tang Chengcc4299d2020-03-12 15:55:12 +0800144
145 paths:
146 qrcodePayInit:
147 parameters:
148 - $ref: definitions.yaml#/components/headers/TenantId
149 post:
150 operationId: qrcodePayInit
151 tags:
152 - pos
153 requestBody:
154 description: QrCode 初始化
155 content:
156 application/json:
157 schema:
158 $ref: '#/components/schemas/QrcodePayInitRequest'
159
160 responses:
161 '200':
162 description: 初始化成功
163 content:
164 application/json:
sijun.life202db2020-03-13 18:54:37 +0800165 schema:
166 $ref: '#/components/schemas/QrcodePayInitResponse'
Tang Chengd500f8b2020-03-24 11:33:30 +0800167 '500':
Tang Chengc1b76582020-03-20 15:44:40 +0800168 $ref: 'definitions.yaml#/components/responses/CommonError'
Tang Chengcc4299d2020-03-12 15:55:12 +0800169 qrcodePayConfirm:
170 parameters:
171 - $ref: definitions.yaml#/components/headers/TenantId
172 post:
173 operationId: qrcodePayConfirm
174 tags:
175 - pos
176 requestBody:
177 description: Qrcode确认
178 content:
179 application/json:
180 schema:
181 $ref: '#/components/schemas/QrcodePayConfirmRequest'
182 responses:
183 '200':
184 description: 交易成功
185 content:
186 application/json:
sijun.life202db2020-03-13 18:54:37 +0800187 schema:
188 $ref: '#/components/schemas/QrcodePayConfirmResponse'
Tang Chengcc4299d2020-03-12 15:55:12 +0800189 '409':
190 description: 交易正忙,稍后重试
191 content:
192 application/json:
Tang Cheng3b2c8202020-03-17 08:45:40 +0800193 schema:
194 $ref: 'definitions.yaml#/components/schemas/ErrorResponse'
Tang Chengd500f8b2020-03-24 11:33:30 +0800195 '500':
Tang Chengc1b76582020-03-20 15:44:40 +0800196 $ref: 'definitions.yaml#/components/responses/CommonError'
Tang Chengcc4299d2020-03-12 15:55:12 +0800197 qrcodePayQuery:
198 parameters:
199 - $ref: 'definitions.yaml#/components/headers/TenantId'
200 - name: refno
201 in: path
202 description: 系统交易参考号
203 required: true
204 schema:
205 type: string
206 title: 系统交易参考号
207 get:
208 description: 根据系统交易参考号查询流水状态
209 tags:
210 - pos
211 operationId: qrcodePayQuery
212 responses:
213 '200':
214 description: 查询成功
215 content:
216 application/json:
Tang Cheng3b2c8202020-03-17 08:45:40 +0800217 schema:
218 $ref: '#/components/schemas/QrcodePayConfirmResponse'
Tang Chengd500f8b2020-03-24 11:33:30 +0800219 '500':
Tang Chengc1b76582020-03-20 15:44:40 +0800220 $ref: 'definitions.yaml#/components/responses/CommonError'
Tang Cheng3b2c8202020-03-17 08:45:40 +0800221 refund:
222 parameters:
223 - $ref: 'definitions.yaml#/components/headers/TenantId'
224 post:
225 description: 退款交易
226 tags:
227 - pos
228 operationId: refund
229 requestBody:
230 content:
231 application/json:
232 schema:
233 $ref: '#/components/schemas/RefundRequest'
234 responses:
235 '200':
236 description: 退款申请成功,等待查询
237 content:
238 application/json:
239 schema:
240 $ref: '#/components/schemas/RefundResponse'
241 '409':
Tang Chengc1b76582020-03-20 15:44:40 +0800242 description: |
243 退款申请失败,订单号已存在或正在退款中
Tang Cheng3b2c8202020-03-17 08:45:40 +0800244 content:
245 application/json:
246 schema:
247 $ref: 'definitions.yaml#/components/schemas/ErrorResponse'
Tang Chengd500f8b2020-03-24 11:33:30 +0800248 '500':
Tang Chengc1b76582020-03-20 15:44:40 +0800249 $ref: 'definitions.yaml#/components/responses/CommonError'
Tang Cheng3b2c8202020-03-17 08:45:40 +0800250 refundQuery:
251 parameters:
252 - $ref: 'definitions.yaml#/components/headers/TenantId'
sijun.li925a8342020-03-20 17:38:41 +0800253 - name: refno
Tang Cheng3b2c8202020-03-17 08:45:40 +0800254 in: path
sijun.li925a8342020-03-20 17:38:41 +0800255 description: 系统交易参考号
Tang Cheng3b2c8202020-03-17 08:45:40 +0800256 required: true
257 schema:
258 type: string
sijun.li925a8342020-03-20 17:38:41 +0800259 title: 系统交易参考号
Tang Cheng3b2c8202020-03-17 08:45:40 +0800260 get:
261 description: 退款申请查询
262 tags:
263 - pos
264 operationId: refundQuery
265 responses:
266 '200':
267 description: 退款申请查询成功
268 content:
269 application/json:
270 schema:
271 $ref: '#/components/schemas/RefundResponse'
272 '404':
273 description: 退款申请订单不存在
274 content:
275 application/json:
276 schema:
277 $ref: 'definitions.yaml#/components/schemas/ErrorResponse'
Tang Chengd500f8b2020-03-24 11:33:30 +0800278 '500':
Tang Chengc1b76582020-03-20 15:44:40 +0800279 $ref: 'definitions.yaml#/components/responses/CommonError'