获取买单自动权益计算数据接口
返回各支付情况
请求地址(POST)
https://openapi.1card1.cn/VipCloud/Get_UpayBuyInfo?openId=[OpenId]&signature=[Signature]×tamp=[TimeStamp]
字段 | 说明 |
---|---|
OpenId | 登陆开放平台生成的OpenId |
Signature | 签名=md5(OpenId+Secret+Timestamp+data),格式:32位md5大写加密 |
TimeStamp | 发起请求的时间戳,查看标准timestamp |
请求说明
data={"thirdOpenId": "og_8Zwl8LPgeY7pIIMziii5Apd7I","deviceType":1,"userAccount":"10000","totalMoney":100,"subductionCash":0}
字段 | 是否必须 | 说明 |
---|---|---|
deviceType | 是 | 用户类型(1,微信;2,支付宝) |
thirdOpenId | 是 | 绑定类型Id |
userAccount | 是 | 工号 |
totalMoney | 是 | 支付总金额 |
subductionCash | 否 | 支付不优惠金额 |
返回说明
成功时返回:
{"status":0,"message":"获取成功","totalMoney":100.0,"subductionCash":90.0, "uPayDiscount":1.0,"paidCoupon":66.00,"paidPoint":26.40,"usedPoint":13.2000000,"payCash":6.60, "couponList":"{\"couponSendNoteGuid\":\"4b0d9806-90e7-e711-85bc-0010184dbd22\",\"usedCount\":1,\"name\":\"下午茶点心专用\"}", "activityRule":"每满10元减1元,最高可减100元","preferentialType":3,"payType":23,"availablePoint":1726.77,"pointPerYuan":0.5, "paidMoneyMaxRate":0.8000,"cardId":"18520830250","isNeedMember":false,"isAutoRegister":true }
失败时返回:
{"status":-1,"message":"传入信息错误"}
字段 | 是否必须 | 说明 |
---|---|---|
status | 是 | 状态(0,成功;-1,失败) |
message | 是 | 请求失败及原因 |
totalMoney | 是 | 支付总金额(该值是传过来的值) |
subductionCash | 是 | 支付不优惠金额(该值是传过来的值) |
uPayDiscount | 是 | 门店优惠活动抵扣金额 |
paidCoupon | 是 | 优惠券抵扣金额 |
paidPoint | 是 | 积分抵扣金额 |
paidValue | 是 | 储值支付金额 |
payCash | 是 | 剩下需支付金额 |
couponList | 否 | 使用的优惠券列表 Json字符串(couponSendNoteGuid:优惠券发送记录唯一标识 (通过接口“获取已发送优惠券”获得“Guid”字段) ;count:核销数量) |
usedPoint | 是 | 本次使用的积分 |
pointPerYuan | 是 | 积分兑换比例,如pointPerYuan=100时,即100积分兑换1元 |
paidMoneyMaxRate | 是 | 积分最大抵扣值 |
preferentialType | 是 | 优惠方式 可能返回的值 1,2,3 (积分type:1 type ,优惠券type:2) 判断使用 preferentialType & 优惠type >0 则允许使用 |
payType | 是 | 支付方式 可能返回的值 1,2,3,4... (支付宝支付type:1,微信支付type:2, 储值:4, 积分:8, 优惠券:64) 判断使用 payType & 支付方式类型type >0 则允许使用(其使用preferentialType判断优惠券及积分也是可以的) |
activityRule | 是 | 门店商户优惠活动规则说明 如每满10元减1元,最大优惠2元 |
availablePoint | 是 | 会员可用积分 |
availableValue | 是 | 会员可用储值 |
cardId | 是 | 会员卡号 |
isNeedMember | 是 | 是否开启先开卡再买单 |
isAutoRegister | 是 | 是否开启支付即会员(若返回null 时则为否) |