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' |
| 55 | dlttype: |
| 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' |
| 89 | RefundRequest: |
| 90 | type: object |
| 91 | title: 退款申请 |
| 92 | required: |
| 93 | - billno |
| 94 | - transDate |
| 95 | - transTime |
| 96 | - refno |
| 97 | - amount |
| 98 | properties: |
| 99 | billno: |
| 100 | title: 退款申请订单号 |
| 101 | $ref: 'definitions.yaml#/components/schemas/Refno' |
| 102 | transDate: |
| 103 | $ref: 'definitions.yaml#/components/schemas/TransDate' |
| 104 | transTime: |
| 105 | $ref: 'definitions.yaml#/components/schemas/TransTime' |
| 106 | refno: |
| 107 | title: 退款申请原始订单交易参考号 |
| 108 | $ref: 'definitions.yaml#/components/schemas/Refno' |
| 109 | amount: |
| 110 | type: integer |
| 111 | title: 退款金额, 正式 |
| 112 | RefundResponse: |
| 113 | type: object |
| 114 | title: 退款申请应答 |
| 115 | properties: |
| 116 | billno: |
| 117 | title: 退款申请订单号 |
| 118 | $ref: 'definitions.yaml#/components/schemas/Refno' |
| 119 | hostDate: |
| 120 | $ref: 'definitions.yaml#/components/schemas/TransDate' |
| 121 | hostTime: |
| 122 | $ref: 'definitions.yaml#/components/schemas/TransTime' |
| 123 | refno: |
| 124 | title: 退款申请原始订单交易参考号 |
| 125 | $ref: 'definitions.yaml#/components/schemas/Refno' |
| 126 | result: |
| 127 | title: 退款处理结果 |
| 128 | $ref: 'definitions.yaml#/components/schemas/TransResult' |
Tang Cheng | cc4299d | 2020-03-12 15:55:12 +0800 | [diff] [blame] | 129 | |
| 130 | paths: |
| 131 | qrcodePayInit: |
| 132 | parameters: |
| 133 | - $ref: definitions.yaml#/components/headers/TenantId |
| 134 | post: |
| 135 | operationId: qrcodePayInit |
| 136 | tags: |
| 137 | - pos |
| 138 | requestBody: |
| 139 | description: QrCode 初始化 |
| 140 | content: |
| 141 | application/json: |
| 142 | schema: |
| 143 | $ref: '#/components/schemas/QrcodePayInitRequest' |
| 144 | |
| 145 | responses: |
| 146 | '200': |
| 147 | description: 初始化成功 |
| 148 | content: |
| 149 | application/json: |
sijun.li | fe202db | 2020-03-13 18:54:37 +0800 | [diff] [blame] | 150 | schema: |
| 151 | $ref: '#/components/schemas/QrcodePayInitResponse' |
Tang Cheng | cc4299d | 2020-03-12 15:55:12 +0800 | [diff] [blame] | 152 | 'default': |
| 153 | description: 请求错误 |
| 154 | content: |
| 155 | application/json: |
Tang Cheng | 3b2c820 | 2020-03-17 08:45:40 +0800 | [diff] [blame] | 156 | schema: |
| 157 | $ref: 'definitions.yaml#/components/schemas/ErrorResponse' |
Tang Cheng | cc4299d | 2020-03-12 15:55:12 +0800 | [diff] [blame] | 158 | qrcodePayConfirm: |
| 159 | parameters: |
| 160 | - $ref: definitions.yaml#/components/headers/TenantId |
| 161 | post: |
| 162 | operationId: qrcodePayConfirm |
| 163 | tags: |
| 164 | - pos |
| 165 | requestBody: |
| 166 | description: Qrcode确认 |
| 167 | content: |
| 168 | application/json: |
| 169 | schema: |
| 170 | $ref: '#/components/schemas/QrcodePayConfirmRequest' |
| 171 | responses: |
| 172 | '200': |
| 173 | description: 交易成功 |
| 174 | content: |
| 175 | application/json: |
sijun.li | fe202db | 2020-03-13 18:54:37 +0800 | [diff] [blame] | 176 | schema: |
| 177 | $ref: '#/components/schemas/QrcodePayConfirmResponse' |
Tang Cheng | cc4299d | 2020-03-12 15:55:12 +0800 | [diff] [blame] | 178 | '409': |
| 179 | description: 交易正忙,稍后重试 |
| 180 | content: |
| 181 | application/json: |
Tang Cheng | 3b2c820 | 2020-03-17 08:45:40 +0800 | [diff] [blame] | 182 | schema: |
| 183 | $ref: 'definitions.yaml#/components/schemas/ErrorResponse' |
Tang Cheng | cc4299d | 2020-03-12 15:55:12 +0800 | [diff] [blame] | 184 | 'default': |
| 185 | description: 交易失败 |
| 186 | content: |
| 187 | application/json: |
Tang Cheng | 3b2c820 | 2020-03-17 08:45:40 +0800 | [diff] [blame] | 188 | schema: |
| 189 | $ref: 'definitions.yaml#/components/schemas/ErrorResponse' |
Tang Cheng | cc4299d | 2020-03-12 15:55:12 +0800 | [diff] [blame] | 190 | qrcodePayQuery: |
| 191 | parameters: |
| 192 | - $ref: 'definitions.yaml#/components/headers/TenantId' |
| 193 | - name: refno |
| 194 | in: path |
| 195 | description: 系统交易参考号 |
| 196 | required: true |
| 197 | schema: |
| 198 | type: string |
| 199 | title: 系统交易参考号 |
| 200 | get: |
| 201 | description: 根据系统交易参考号查询流水状态 |
| 202 | tags: |
| 203 | - pos |
| 204 | operationId: qrcodePayQuery |
| 205 | responses: |
| 206 | '200': |
| 207 | description: 查询成功 |
| 208 | content: |
| 209 | application/json: |
Tang Cheng | 3b2c820 | 2020-03-17 08:45:40 +0800 | [diff] [blame] | 210 | schema: |
| 211 | $ref: '#/components/schemas/QrcodePayConfirmResponse' |
Tang Cheng | cc4299d | 2020-03-12 15:55:12 +0800 | [diff] [blame] | 212 | 'default': |
| 213 | description: 查询失败 |
| 214 | content: |
| 215 | application/json: |
Tang Cheng | 3b2c820 | 2020-03-17 08:45:40 +0800 | [diff] [blame] | 216 | schema: |
| 217 | $ref: 'definitions.yaml#/components/schemas/ErrorResponse' |
| 218 | refund: |
| 219 | parameters: |
| 220 | - $ref: 'definitions.yaml#/components/headers/TenantId' |
| 221 | post: |
| 222 | description: 退款交易 |
| 223 | tags: |
| 224 | - pos |
| 225 | operationId: refund |
| 226 | requestBody: |
| 227 | content: |
| 228 | application/json: |
| 229 | schema: |
| 230 | $ref: '#/components/schemas/RefundRequest' |
| 231 | responses: |
| 232 | '200': |
| 233 | description: 退款申请成功,等待查询 |
| 234 | content: |
| 235 | application/json: |
| 236 | schema: |
| 237 | $ref: '#/components/schemas/RefundResponse' |
| 238 | '409': |
| 239 | description: 退款申请失败,订单号已存在或正在退款中 |
| 240 | content: |
| 241 | application/json: |
| 242 | schema: |
| 243 | $ref: 'definitions.yaml#/components/schemas/ErrorResponse' |
| 244 | default: |
| 245 | description: 退款申请失败 |
| 246 | content: |
| 247 | application/json: |
| 248 | schema: |
| 249 | $ref: 'definitions.yaml#/components/schemas/ErrorResponse' |
| 250 | refundQuery: |
| 251 | parameters: |
| 252 | - $ref: 'definitions.yaml#/components/headers/TenantId' |
| 253 | - name: billno |
| 254 | in: path |
| 255 | description: 退款订单号 |
| 256 | required: true |
| 257 | schema: |
| 258 | type: string |
| 259 | title: 退款订单号 |
| 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' |
| 278 | default: |
| 279 | description: 退款申请失败 |
| 280 | content: |
| 281 | application/json: |
| 282 | schema: |
| 283 | $ref: 'definitions.yaml#/components/schemas/ErrorResponse' |