开放平台

消费收银
当消费明细为空时,等同于快速消费
特别注意:移动支付仅供记账,并没有实际调用微信支付接口,当且仅当thirdPayType与thirdPayValue都不为空时有效

请求地址(POST)

https://openapi.1card1.cn/OpenApi/Consume?openId=[OpenId]&signature=[Signature]&timestamp=[TimeStamp]

字段 说明
OpenId 登陆开放平台生成的OpenId
Signature 签名=md5(OpenId+Secret+Timestamp+data),格式:32位md5大写加密
TimeStamp 发起请求的时间戳,查看标准timestamp

请求说明

data={"cardId": "1card1Test","password": "123456","userAccount": "10003","operateTime":"2014-09-17 09:27:21","totalMoney": 40,"totalPaid": 40,"paidMoney": 6, "paidPoint": 7,"paidValue": 8,"paidCard": 5,"paidOther": 0,"otherPayType": "美团券","paidCoupon": 10, "thirdPayType": "1","thirdPayValue": "4","thirdPayOrderNo": "2016070400000001","thirdpayTradeNo":"4001952001201607048339487774", "meno":"熟人小李推荐,打折","consumeList": [{"barcode": "0001","name": "123","number": 1, "disCount": 0.8,"paidMoney": 22,"meno": ""},{"barcode": "0002","name": "456","number": 2,"disCount": 1,"paidMoney": 18,"meno": ""}],"couponList": [{"sendNoteGuid": "AE3166F5-DEEF-4FCD-B984-0683329BAB63","count": 1}, {"sendNoteGuid": "BE3166F5-DEEF-4FCD-B984-0683329BAB63","count": 2}]}

字段 是否必须 说明
cardId 卡号(为空时表示散客,此时paidValue、paidPoint不生效)
password 会员密码(会员系统中设置储值消费或者积分消费需要密码时,此项必须)
userAccount 工号
operateTime 提交时间(补录单据时使用)
totalMoney 应付金额
totalPaid 实付金额
paidMoney 现金支付
paidPoint 积分抵现(cardId为空时不生效)
paidValue 储值支付(cardId为空时不生效)
paidCard 银联支付
paidCoupon 优惠券支付(新增参数。此参数为0或者为空时,couponList参数无效)
thirdPayType 移动支付类型,1:微信支付、2:支付宝支付(thirdPayType与thirdPayValue同时不为空时有效)
thirdPayValue 移动支付金额(thirdPayType与thirdPayValue同时不为空时有效)
thirdPayOrderNo 移动支付订单号(向移动支付接口发起请求时的订单号)
thirdpayTradeNo 移动支付交易号(移动支付接口返回的交易单号)
paidOther 其他支付
otherPayType 其他支付类型(其他支付的别名,在“系统设置-参数设置-其他参数-支付方式名称”中设置)
meno 单据备注
consumeList Json字符串(barcode:商品编码 (通过接口“获取商品列表”获得“Barcode”字段) ;name:商品名称;disCount:商品折扣;number:商品数量; paidMoney:该明细总应付金额;meno:此明细的备注)
"consumeList":[] 或者不传consumeList,等同于快速消费
couponList Json字符串(sendNoteGuid:优惠券发送记录唯一标识 (通过接口“获取已发送优惠券”获得“Guid”字段) ;count:核销数量)
此参数为空时,paidCoupon无效

返回说明

成功时返回:

{"status":0,"message":"消费成功!","billNumber":"XF20140524000015","availablePoint":999,"availableValue":888}

失败时返回:

{"status":-1,"message":"消费失败及原因"}

字段 是否必须 说明
status 状态(0,成功;-1,失败)
message 消费是否成功及提示
billNumber 消费成功之后的单据号
availablePoint 剩余积分
availableValue 剩余储值

会员消费 调试