预下单接口,该接口可返回待交易商品交易金额,以及可以享受的优化,以及折后实付
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
storeId | String | 可选 | 100004 | 门店ID。 | |
goodsList | RcGoodsParam [] | 必须 |
|
商品列表,列表元素格式为:商品标识:商品数量 | |
|
|||||
storeIdType | String | 可选 | RPLUS | 门店Id类型,RPLUS:零售+门店ID; PLACE:商户中心门店ID; CUSTOM:自有门店ID,须在商户中心有映射关系 |
名称 | 类型 | 示例值 | 描述 | ||||
---|---|---|---|---|---|---|---|
success | Boolean | true | 业务失败或成功 true|false | ||||
errCode | String | 20887 | 错误码 | ||||
errMsg | String | 无效参数 | 错误信息 | ||||
data | RcTradePreCreateDTO | 业务数据 | |||||
|
|||||||
promotionList | RcPromotion [] | 权益列表 | |||||
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | QimenCloudClient client = new DefaultQimenCloudClient(url, appkey, secret); AlibabaUniTradePrecreateRequest req = new AlibabaUniTradePrecreateRequest(); req.setStoreId( "100004" ); List<AlibabaUniTradePrecreateRequest.RcGoodsParam> list2 = new ArrayList<AlibabaUniTradePrecreateRequest.RcGoodsParam>(); AlibabaUniTradePrecreateRequest.RcGoodsParam obj3 = new AlibabaUniTradePrecreateRequest.RcGoodsParam(); list2.add(obj3); obj3.setGoodsId( "69534523423" ); obj3.setQuantity( "1" ); obj3.setPrice(13850L); obj3.setIdType( "CUSTOM" ); obj3.setGuider( "9527" ); obj3.setOutSubTradeNo( "OTS5435643" ); req.setGoodsList(list2); req.setStoreIdType( "RPLUS" ); AlibabaUniTradePrecreateResponse rsp = client.execute(req, sessionKey); System.out.println(rsp.getBody()); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | < success >true</ success > < errCode >20887</ errCode > < errMsg >无效参数</ errMsg > < data > < totalAmount >15000</ totalAmount > < actualPayAmount >10000</ actualPayAmount > < goodsList > < rc_goods > < goodsId >69534523423</ goodsId > < quantity >1</ quantity > < price >13850</ price > < idType >CUSTOM</ idType > < itemId >4354355</ itemId > < skuId >12321431</ skuId > < title >如意金箍棒</ title > < storeId >100004</ storeId > < saleable >true</ saleable > < reason >已售出</ reason > < originPrice >13850</ originPrice > < guider >9527</ guider > </ rc_goods > </ goodsList > </ data > < promotionList > < rc_promotion > < promotionId >45346547</ promotionId > < promotionTitle >满100减10</ promotionTitle > < promotionDesc >不可叠加使用</ promotionDesc > < deductedAmount >1000</ deductedAmount > < type >true</ type > </ rc_promotion > </ promotionList > |
1 2 3 4 5 6 | < error_response > < code >50</ code > < msg >Remote service error</ msg > < sub_code >isv.invalid-parameter</ sub_code > < sub_msg >非法参数</ sub_msg > </ error_response > |
错误码 | 错误描述 | 解决方案 |
---|