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' |
| 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 | c1b7658 | 2020-03-20 15:44:40 +0800 | [diff] [blame^] | 152 | default: |
| 153 | $ref: 'definitions.yaml#/components/responses/CommonError' |
Tang Cheng | cc4299d | 2020-03-12 15:55:12 +0800 | [diff] [blame] | 154 | qrcodePayConfirm: |
| 155 | parameters: |
| 156 | - $ref: definitions.yaml#/components/headers/TenantId |
| 157 | post: |
| 158 | operationId: qrcodePayConfirm |
| 159 | tags: |
| 160 | - pos |
| 161 | requestBody: |
| 162 | description: Qrcode确认 |
| 163 | content: |
| 164 | application/json: |
| 165 | schema: |
| 166 | $ref: '#/components/schemas/QrcodePayConfirmRequest' |
| 167 | responses: |
| 168 | '200': |
| 169 | description: 交易成功 |
| 170 | content: |
| 171 | application/json: |
sijun.li | fe202db | 2020-03-13 18:54:37 +0800 | [diff] [blame] | 172 | schema: |
| 173 | $ref: '#/components/schemas/QrcodePayConfirmResponse' |
Tang Cheng | cc4299d | 2020-03-12 15:55:12 +0800 | [diff] [blame] | 174 | '409': |
| 175 | description: 交易正忙,稍后重试 |
| 176 | content: |
| 177 | application/json: |
Tang Cheng | 3b2c820 | 2020-03-17 08:45:40 +0800 | [diff] [blame] | 178 | schema: |
| 179 | $ref: 'definitions.yaml#/components/schemas/ErrorResponse' |
Tang Cheng | c1b7658 | 2020-03-20 15:44:40 +0800 | [diff] [blame^] | 180 | default: |
| 181 | $ref: 'definitions.yaml#/components/responses/CommonError' |
Tang Cheng | cc4299d | 2020-03-12 15:55:12 +0800 | [diff] [blame] | 182 | qrcodePayQuery: |
| 183 | parameters: |
| 184 | - $ref: 'definitions.yaml#/components/headers/TenantId' |
| 185 | - name: refno |
| 186 | in: path |
| 187 | description: 系统交易参考号 |
| 188 | required: true |
| 189 | schema: |
| 190 | type: string |
| 191 | title: 系统交易参考号 |
| 192 | get: |
| 193 | description: 根据系统交易参考号查询流水状态 |
| 194 | tags: |
| 195 | - pos |
| 196 | operationId: qrcodePayQuery |
| 197 | responses: |
| 198 | '200': |
| 199 | description: 查询成功 |
| 200 | content: |
| 201 | application/json: |
Tang Cheng | 3b2c820 | 2020-03-17 08:45:40 +0800 | [diff] [blame] | 202 | schema: |
| 203 | $ref: '#/components/schemas/QrcodePayConfirmResponse' |
Tang Cheng | c1b7658 | 2020-03-20 15:44:40 +0800 | [diff] [blame^] | 204 | default: |
| 205 | $ref: 'definitions.yaml#/components/responses/CommonError' |
Tang Cheng | 3b2c820 | 2020-03-17 08:45:40 +0800 | [diff] [blame] | 206 | refund: |
| 207 | parameters: |
| 208 | - $ref: 'definitions.yaml#/components/headers/TenantId' |
| 209 | post: |
| 210 | description: 退款交易 |
| 211 | tags: |
| 212 | - pos |
| 213 | operationId: refund |
| 214 | requestBody: |
| 215 | content: |
| 216 | application/json: |
| 217 | schema: |
| 218 | $ref: '#/components/schemas/RefundRequest' |
| 219 | responses: |
| 220 | '200': |
| 221 | description: 退款申请成功,等待查询 |
| 222 | content: |
| 223 | application/json: |
| 224 | schema: |
| 225 | $ref: '#/components/schemas/RefundResponse' |
| 226 | '409': |
Tang Cheng | c1b7658 | 2020-03-20 15:44:40 +0800 | [diff] [blame^] | 227 | description: | |
| 228 | 退款申请失败,订单号已存在或正在退款中 |
Tang Cheng | 3b2c820 | 2020-03-17 08:45:40 +0800 | [diff] [blame] | 229 | content: |
| 230 | application/json: |
| 231 | schema: |
| 232 | $ref: 'definitions.yaml#/components/schemas/ErrorResponse' |
| 233 | default: |
Tang Cheng | c1b7658 | 2020-03-20 15:44:40 +0800 | [diff] [blame^] | 234 | $ref: 'definitions.yaml#/components/responses/CommonError' |
Tang Cheng | 3b2c820 | 2020-03-17 08:45:40 +0800 | [diff] [blame] | 235 | refundQuery: |
| 236 | parameters: |
| 237 | - $ref: 'definitions.yaml#/components/headers/TenantId' |
| 238 | - name: billno |
| 239 | in: path |
| 240 | description: 退款订单号 |
| 241 | required: true |
| 242 | schema: |
| 243 | type: string |
| 244 | title: 退款订单号 |
| 245 | get: |
| 246 | description: 退款申请查询 |
| 247 | tags: |
| 248 | - pos |
| 249 | operationId: refundQuery |
| 250 | responses: |
| 251 | '200': |
| 252 | description: 退款申请查询成功 |
| 253 | content: |
| 254 | application/json: |
| 255 | schema: |
| 256 | $ref: '#/components/schemas/RefundResponse' |
| 257 | '404': |
| 258 | description: 退款申请订单不存在 |
| 259 | content: |
| 260 | application/json: |
| 261 | schema: |
| 262 | $ref: 'definitions.yaml#/components/schemas/ErrorResponse' |
| 263 | default: |
Tang Cheng | c1b7658 | 2020-03-20 15:44:40 +0800 | [diff] [blame^] | 264 | $ref: 'definitions.yaml#/components/responses/CommonError' |