Tang Cheng | cc4299d | 2020-03-12 15:55:12 +0800 | [diff] [blame] | 1 | components: |
| 2 | schemas: |
Tang Cheng | cc4299d | 2020-03-12 15:55:12 +0800 | [diff] [blame] | 3 | 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.li | 2da2d5f | 2020-03-17 17:33:46 +0800 | [diff] [blame] | 55 | dtltype: |
Tang Cheng | cc4299d | 2020-03-12 15:55:12 +0800 | [diff] [blame] | 56 | 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 Cheng | 3b2c820 | 2020-03-17 08:45:40 +0800 | [diff] [blame] | 88 | $ref: 'definitions.yaml#/components/schemas/TransResult' |
sijun.li | 925a834 | 2020-03-20 17:38:41 +0800 | [diff] [blame^] | 89 | amount: |
| 90 | type: integer |
| 91 | format: int32 |
| 92 | title: 消费金额 |
Tang Cheng | 3b2c820 | 2020-03-17 08:45:40 +0800 | [diff] [blame] | 93 | RefundRequest: |
| 94 | type: object |
| 95 | title: 退款申请 |
| 96 | required: |
| 97 | - billno |
| 98 | - transDate |
| 99 | - transTime |
| 100 | - refno |
| 101 | - amount |
sijun.li | 925a834 | 2020-03-20 17:38:41 +0800 | [diff] [blame^] | 102 | - shopaccno |
Tang Cheng | 3b2c820 | 2020-03-17 08:45:40 +0800 | [diff] [blame] | 103 | 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.li | 925a834 | 2020-03-20 17:38:41 +0800 | [diff] [blame^] | 114 | shopaccno: |
| 115 | $ref: 'definitions.yaml#/components/schemas/ShopAccNo' |
Tang Cheng | 3b2c820 | 2020-03-17 08:45:40 +0800 | [diff] [blame] | 116 | 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.li | 925a834 | 2020-03-20 17:38:41 +0800 | [diff] [blame^] | 133 | refundAmount: |
| 134 | type: integer |
| 135 | format: int32 |
| 136 | title: 退款金额 |
| 137 | leftAmount: |
| 138 | type: integer |
| 139 | format: int32 |
| 140 | title: 原流水剩余金额 |
Tang Cheng | 3b2c820 | 2020-03-17 08:45:40 +0800 | [diff] [blame] | 141 | result: |
| 142 | title: 退款处理结果 |
| 143 | $ref: 'definitions.yaml#/components/schemas/TransResult' |
Tang Cheng | cc4299d | 2020-03-12 15:55:12 +0800 | [diff] [blame] | 144 | |
| 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.li | fe202db | 2020-03-13 18:54:37 +0800 | [diff] [blame] | 165 | schema: |
| 166 | $ref: '#/components/schemas/QrcodePayInitResponse' |
Tang Cheng | d500f8b | 2020-03-24 11:33:30 +0800 | [diff] [blame] | 167 | '500': |
Tang Cheng | c1b7658 | 2020-03-20 15:44:40 +0800 | [diff] [blame] | 168 | $ref: 'definitions.yaml#/components/responses/CommonError' |
Tang Cheng | cc4299d | 2020-03-12 15:55:12 +0800 | [diff] [blame] | 169 | 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.li | fe202db | 2020-03-13 18:54:37 +0800 | [diff] [blame] | 187 | schema: |
| 188 | $ref: '#/components/schemas/QrcodePayConfirmResponse' |
Tang Cheng | cc4299d | 2020-03-12 15:55:12 +0800 | [diff] [blame] | 189 | '409': |
| 190 | description: 交易正忙,稍后重试 |
| 191 | content: |
| 192 | application/json: |
Tang Cheng | 3b2c820 | 2020-03-17 08:45:40 +0800 | [diff] [blame] | 193 | schema: |
| 194 | $ref: 'definitions.yaml#/components/schemas/ErrorResponse' |
Tang Cheng | d500f8b | 2020-03-24 11:33:30 +0800 | [diff] [blame] | 195 | '500': |
Tang Cheng | c1b7658 | 2020-03-20 15:44:40 +0800 | [diff] [blame] | 196 | $ref: 'definitions.yaml#/components/responses/CommonError' |
Tang Cheng | cc4299d | 2020-03-12 15:55:12 +0800 | [diff] [blame] | 197 | 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 Cheng | 3b2c820 | 2020-03-17 08:45:40 +0800 | [diff] [blame] | 217 | schema: |
| 218 | $ref: '#/components/schemas/QrcodePayConfirmResponse' |
Tang Cheng | d500f8b | 2020-03-24 11:33:30 +0800 | [diff] [blame] | 219 | '500': |
Tang Cheng | c1b7658 | 2020-03-20 15:44:40 +0800 | [diff] [blame] | 220 | $ref: 'definitions.yaml#/components/responses/CommonError' |
Tang Cheng | 3b2c820 | 2020-03-17 08:45:40 +0800 | [diff] [blame] | 221 | 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 Cheng | c1b7658 | 2020-03-20 15:44:40 +0800 | [diff] [blame] | 242 | description: | |
| 243 | 退款申请失败,订单号已存在或正在退款中 |
Tang Cheng | 3b2c820 | 2020-03-17 08:45:40 +0800 | [diff] [blame] | 244 | content: |
| 245 | application/json: |
| 246 | schema: |
| 247 | $ref: 'definitions.yaml#/components/schemas/ErrorResponse' |
Tang Cheng | d500f8b | 2020-03-24 11:33:30 +0800 | [diff] [blame] | 248 | '500': |
Tang Cheng | c1b7658 | 2020-03-20 15:44:40 +0800 | [diff] [blame] | 249 | $ref: 'definitions.yaml#/components/responses/CommonError' |
Tang Cheng | 3b2c820 | 2020-03-17 08:45:40 +0800 | [diff] [blame] | 250 | refundQuery: |
| 251 | parameters: |
| 252 | - $ref: 'definitions.yaml#/components/headers/TenantId' |
sijun.li | 925a834 | 2020-03-20 17:38:41 +0800 | [diff] [blame^] | 253 | - name: refno |
Tang Cheng | 3b2c820 | 2020-03-17 08:45:40 +0800 | [diff] [blame] | 254 | in: path |
sijun.li | 925a834 | 2020-03-20 17:38:41 +0800 | [diff] [blame^] | 255 | description: 系统交易参考号 |
Tang Cheng | 3b2c820 | 2020-03-17 08:45:40 +0800 | [diff] [blame] | 256 | required: true |
| 257 | schema: |
| 258 | type: string |
sijun.li | 925a834 | 2020-03-20 17:38:41 +0800 | [diff] [blame^] | 259 | title: 系统交易参考号 |
Tang Cheng | 3b2c820 | 2020-03-17 08:45:40 +0800 | [diff] [blame] | 260 | 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 Cheng | d500f8b | 2020-03-24 11:33:30 +0800 | [diff] [blame] | 278 | '500': |
Tang Cheng | c1b7658 | 2020-03-20 15:44:40 +0800 | [diff] [blame] | 279 | $ref: 'definitions.yaml#/components/responses/CommonError' |