# 交易结果查询 #### **接口用途** - 在收银机未收到后台返回时,可以调用此接口查询原交易的状态。 #### **action** - `inquiry` #### **请求参数,收银机===>中间件**
字段类型是否必填字段意义备注
traceNoString收银机流水号不允许重复
originalTraceNoString原收银机流水号传入需要查询的原交易收银机流水号
#### **请求报文举例** ``` { "traceNo": "99000009100010101732123", "originalTraceNo": "99000009100010101732124" } ``` #### **返回参数,中间件===>收银机**
字段类型是否必填字段意义备注
traceNoString收银机流水号不允许重复
orderNoString交易订单号单位:元
transDateString交易时间格式为:YYYYmmddHHMMSS
returnCodeString返回码00表示交易成功,其他表示失败
returnDescString返回信息交易结果描述或错误原因
paidAmountPrice支付成功总金额单位:元
receiptAmountPrice商户实收金额单位:元
invoiceAmountPrice商户开票金额单位:元
exchangeRateNumber(8,6)汇率1外币等于多少人民币
currencyString货币类型例如:CNY
discountCodeString折扣编码由收银机分配,用于入账计折扣类型,如:2016120102|10.00表示折扣10元
discountNumNumber固定金额折扣数量用于入账计折扣类型的数量
tenderCodeString支付方式编码由收银机分配,用于入账计支付方式,如:2016120101|20.00表示支付20元
activityProductNoString活动产品编号
activityProductNameString活动产品名称
needSameCardBoolean同一张卡支付如满额立减类活动,需要同一张银行卡支付剩余金额
goodsDetailList<[goodsDetail](https://book.e-buy.com/books/ebuy-cashier-middleware-api/page/a0a08 "goodsDetail")>折抵产品明细返回后台已抵扣成功的产品明细
fundChannelList<[fundChannel](https://book.e-buy.com/books/ebuy-cashier-middleware-api/page/e00da "fundChannel")>资金渠道
printDetailObject<[printDetail](https://book.e-buy.com/books/ebuy-cashier-middleware-api/page/310dc "printDetail")>打印信息如需要在收银小票上打印信息时必填
memberDetailObject<[memberDetail](https://book.e-buy.com/books/ebuy-cashier-middleware-api/page/559cb "memberDetail")>会员信息返回本次交易的会员信息
voucherDetailList<[voucherDetail](https://book.e-buy.com/books/ebuy-cashier-middleware-api/page/084b6 "voucherDetail")>优惠券信息返回本次交易的优惠券信息
#### **返回报文举例** ``` { "traceNo": "99000009100010101732123", "orderNo": "171698602301", "transDate": "20161231120533", "returnCode": "00", "returnDesc": "SUCCESS", "paidAmount": 40.8, "receiptAmount": 40.8, "invoiceAmount": 40.8, "exchangeRate": 6.0939, "currency": "CNY", "discountCode": "0001", "discountNum": 20, "tenderCode": "8001", "activityProductNo": "2016123102", "activityProductName": "支付宝支付", "needSameCard": true, "goodsDetail": [ { "goodsCategory": "001", "goodsId": "P00001", "goodsName": "牙膏", "price": 8, "quantity": 2, "rebateCode": "000", "activityNo": "2016123101", "memo": "100123456789" }, { "goodsCategory": "101", "goodsId": "P00002", "goodsName": "洗发水", "price": 24.8, "quantity": 1, "rebateCode": "000", "activityNo": "2016123101", "memo": "100123456789" } ], "fundChannel": [ { "channelNo": "001", "channelName": "用户实付现金", "channelAmount": "20.8" }, { "channelNo": "002", "channelName": "用户积分支付", "channelAmount": "20" } ], "printDetail": { "cardNo64": "622562****8888", "bank": "中国银行", "paymentOrderNo": "201612315689412157458787", "pointSale": "20000", "qrCode1": "htt://www.xxx.com/url", "qrCode2": "", "qrCode3": "", "barCode1": "12345679", "barCode2": "", "barCode3": "" }, "memberDetail": { "memberId": "M000001545", "memberName": "TONY", "grade": "1", "status": "1", "balance": 1000.00, "pointBalance": 30000 } } ``` #### **支持查询的交易** - cardSale - qrcodeSale