Tang Cheng | cc4299d | 2020-03-12 15:55:12 +0800 | [diff] [blame^] | 1 | components: |
| 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: |
| 127 | $ref: '#/components/schemas/QrcodePayInitResponse' |
| 128 | 'default': |
| 129 | description: 请求错误 |
| 130 | content: |
| 131 | application/json: |
| 132 | $ref: '#/components/schemas/ErrorResponse' |
| 133 | qrcodePayConfirm: |
| 134 | parameters: |
| 135 | - $ref: definitions.yaml#/components/headers/TenantId |
| 136 | post: |
| 137 | operationId: qrcodePayConfirm |
| 138 | tags: |
| 139 | - pos |
| 140 | requestBody: |
| 141 | description: Qrcode确认 |
| 142 | content: |
| 143 | application/json: |
| 144 | schema: |
| 145 | $ref: '#/components/schemas/QrcodePayConfirmRequest' |
| 146 | responses: |
| 147 | '200': |
| 148 | description: 交易成功 |
| 149 | content: |
| 150 | application/json: |
| 151 | $ref: '#/components/schemas/QrcodePayConfirmResponse' |
| 152 | '409': |
| 153 | description: 交易正忙,稍后重试 |
| 154 | content: |
| 155 | application/json: |
| 156 | $ref: '#/components/schemas/ErrorResponse' |
| 157 | 'default': |
| 158 | description: 交易失败 |
| 159 | content: |
| 160 | application/json: |
| 161 | $ref: '#/components/schemas/ErrorResponse' |
| 162 | qrcodePayQuery: |
| 163 | parameters: |
| 164 | - $ref: 'definitions.yaml#/components/headers/TenantId' |
| 165 | - name: refno |
| 166 | in: path |
| 167 | description: 系统交易参考号 |
| 168 | required: true |
| 169 | schema: |
| 170 | type: string |
| 171 | title: 系统交易参考号 |
| 172 | get: |
| 173 | description: 根据系统交易参考号查询流水状态 |
| 174 | tags: |
| 175 | - pos |
| 176 | operationId: qrcodePayQuery |
| 177 | responses: |
| 178 | '200': |
| 179 | description: 查询成功 |
| 180 | content: |
| 181 | application/json: |
| 182 | $ref: '#/components/schemas/QrcodePayConfirmResponse' |
| 183 | 'default': |
| 184 | description: 查询失败 |
| 185 | content: |
| 186 | application/json: |
| 187 | $ref: '#/components/schemas/ErrorResponse' |
| 188 | |