有赞新零售社区

发帖
API使用问题»同城云店支付的商品ID与支付成功后推送过来的消息中的商品ID不一致?

[API调用-商品/交易] 同城云店支付的商品ID与支付成功后推送过来的消息中的商品ID不一致?

Nova_WY 2022-07-29 1290 浏览 7 评论 | 只看楼主 [打印]
我们这边是自研的系统跟云店打通,以前采用的是单店版本,更换成同城云店后,购买商品传递过去的商品id(item_id)与支付成功后推送过来的消息(item_id不一致),不是同一个商品,卡住了流程,这个需要怎么解决呢?

应用名称:嘉好生活
                应用AppId:10001156
                ClientId:e5901f68b3550c3cb2
                相关文档地址:https://doc.youzanyun.com/list/MSG/1216       https://doc.youzanyun.com/detail/MSG/301

                问题描述:测试店铺打通有赞,用户支付成功后,没有收到有赞支付成功的消息推送,但是商品分组变更能收到,后台手动推支付消息也能成功
                trace_id:无
                日志:没有任何消息收到
                截图/视频:无
                三方系统:「系统打通」
                店铺Id:110021790
                店铺名称:云测试店铺qz94u

支付时候的商品ID(item_id):238248994
支付成功后有赞推送的商品ID(item_id):1969841884

猜想是不是推送过来的数据并不是商品ID,是需要这个id再去查商品么?但是文档上根本什么都没有写,只写了这个是商品ID,还有有赞云的接口最近同城云店在大更新吗?为什么看到的接口总感觉命名都不一样了,导致不敢过多开发了

求解答,很急




本帖最后由 Nova_WY 于 2022-7-29 11:31 编辑
用手机打开
收藏 ··· 回复
    提供一下具体的订单号
    唯有心静,身外的繁华才不至于扭曲和浮躁。

    有查询到消息推送的记录,帮你进一步排查,请耐心等待
    唯有心静,身外的繁华才不至于扭曲和浮躁。

    消息推送,推给你的消息体发一下。
    唯有心静,身外的繁华才不至于扭曲和浮躁。
    • Nova_WY 2022-07-30
      {"delivery_order":[],"order_promotion":{"item":[],"adjust_fee":"0.00","order":[]},"refund_order":[],"full_order_info":{"address_info":{"self_fetch_info":"","delivery_address":"","delivery_postal_code":"","receiver_name":"","delivery_province":"","delivery_city":"","address_extra":"{}","delivery_district":"","receiver_tel":""},"remark_info":{"buyer_message":""},"pay_info":{"outer_transactions":["2022072922001498831417795750"],"post_fee":"0.00","total_fee":"0.01","payment":"0.01","transaction":["2207291029440002340378"]},"buyer_info":{"outer_user_id":"2088712240598835","buyer_phone":"$pF7/UKQ7jIAbWywxtziuow==$1$","yz_open_id":"UgNYDcdY681279577250611200","fans_type":736,"buyer_id":11157949002,"fans_nickname":"$N0zsweW9aMYNgZtfdR2fmROOT1Aca0+TCZKffYCwvHI=$1$","fans_id":9454567572},"orders":[{"is_cross_border":"","outer_item_id":"jdddd01","discount_price":"0.01","item_type":182,"num":1,"oid":"2886857919659245592","title":"JD-充值卡","fenxiao_payment":"0.00","item_message":"{\"手机号\":\"13400134888\"}","item_no":"","buyer_messages":"{\"手机号\":\"13400134888\"}","cross_border_trade_mode":"","is_present":false,"sub_order_no":"","price":"0.01","fenxiao_price":"0.00","total_fee":"0.01","alias":"27d0tz0y7zxjku3","payment":"0.01","item_barcode":"jdddd01","outer_sku_id":"","goods_url":"https://h5.youzan.com/v2/showcase/goods?alias=27d0tz0y7zxjku3","customs_code":"","item_id":1969841884,"sku_properties_name":"[{\"k\":\"面额\",\"k_id\":4910,\"v\":\"50\",\"v_id\":663}]","sku_id":17957487573,"pic_path":"https://img01.yzcdn.cn/upload_files/2022/07/28/Fr2QK1vNcfmNlnq1LSjOqRJlJBGS.png","sku_no":"","points_price":"0","sku_barcode":""}],"source_info":{"is_offline_order":false,"book_key":"64087e15-a2d8-4fdd-a5cb-b330112320c4","source":{"platform":"alipay","wx_entrance":"direct_buy"}},"order_info":{"consign_time":"","order_extra":{"is_from_cart":"false","is_points_order":"0"},"created":"2022-07-29 10:29:42","offline_id":116495920,"status_str":"已支付","expired_time":"2022-07-29 11:29:42","success_time":"","type":0,"confirm_time":"","tid":"E2022072
    • Nova_WY 2022-07-30
      可否加一个qq直接沟通呢?因为这边开发很急,有赞接口耽搁了五天开发时间了,明天又是周末我们要加班,这问题不然又要耽搁两天,qq号:379760818
    • Nova_WY 2022-07-30
      完整的数据如下:



      {
              "delivery_order": [],
              "order_promotion": {
                      "item": [],
                      "adjust_fee": "0.00",
                      "order": []
              },
              "refund_order": [],
              "full_order_info": {
                      "address_info": {
                              "self_fetch_info": "",
                              "delivery_address": "",
                              "delivery_postal_code": "",
                              "receiver_name": "",
                              "delivery_province": "",
                              "delivery_city": "",
                              "address_extra": "{}",
                              "delivery_district": "",
                              "receiver_tel": ""
                      },
                      "remark_info": {
                              "buyer_message": ""
                      },
                      "pay_info": {
                              "outer_transactions": ["2022072922001498831417795750"],
                              "post_fee": "0.00",
                              "total_fee": "0.01",
                              "payment": "0.01",
                              "transaction": ["2207291029440002340378"]
                      },
                      "buyer_info": {
                              "outer_user_id": "2088712240598835",
                              "buyer_phone": "$pF7/UKQ7jIAbWywxtziuow==$1$",
                              "yz_open_id": "UgNYDcdY681279577250611200",
                              "fans_type": 736,
                              "buyer_id": 11157949002,
                              "fans_nickname": "$N0zsweW9aMYNgZtfdR2fmROOT1Aca0+TCZKffYCwvHI=$1$",
                              "fans_id": 9454567572
                      },
                      "orders": [{
                              "is_cross_border": "",
                              "outer_item_id": "jdddd01",
                              "discount_price": "0.01",
                              "item_type": 182,
                              "num": 1,
                              "oid": "2886857919659245592",
                              "title": "JD-充值卡",
                              "fenxiao_payment": "0.00",
                              "item_message": "{\"手机号\":\"13400134888\"}",
                              "item_no": "",
                              "buyer_messages": "{\"手机号\":\"13400134888\"}",
                              "cross_border_trade_mode": "",
                              "is_present": false,
                              "sub_order_no": "",
                              "price": "0.01",
                              "fenxiao_price": "0.00",
                              "total_fee": "0.01",
                              "alias": "27d0tz0y7zxjku3",
                              "payment": "0.01",
                              "item_barcode": "jdddd01",
                              "outer_sku_id": "",
                              "goods_url": "https://h5.youzan.com/v2/showcase/goods?alias=27d0tz0y7zxjku3",
                              "customs_code": "",
                              "item_id": 1969841884,
                              "sku_properties_name": "[{\"k\":\"面额\",\"k_id\":4910,\"v\":\"50\",\"v_id\":663}]",
                              "sku_id": 17957487573,
                              "pic_path": "https://img01.yzcdn.cn/upload_files/2022/07/28/Fr2QK1vNcfmNlnq1LSjOqRJlJBGS.png",
                              "sku_no": "",
                              "points_price": "0",
                              "sku_barcode": ""
                      }],
                      "source_info": {
                              "is_offline_order": false,
                              "book_key": "64087e15-a2d8-4fdd-a5cb-b330112320c4",
                              "source": {
                                      "platform": "alipay",
                                      "wx_entrance": "direct_buy"
                              }
                      },
                      "order_info": {
                              "consign_time": "",
                              "order_extra": {
                                      "is_from_cart": "false",
                                      "is_points_order": "0"
                              },
                              "created": "2022-07-29 10:29:42",
                              "offline_id": 116495920,
                              "status_str": "已支付",
                              "expired_time": "2022-07-29 11:29:42",
                              "success_time": "",
                              "type": 0,
                              "confirm_time": "",
                              "tid": "E20220729102941058600071",
                              "pay_time": "2022-07-29 10:29:51",
                              "update_time": "2022-07-29 10:29:51",
                              "is_retail_order": true,
                              "team_type": 7,
                              "pay_type": 2,
                              "refund_state": 0,
                              "close_type": 0,
                              "order_tags": {
                                      "is_virtual": true,
                                      "is_member": true,
                                      "is_secured_transactions": true,
                                      "is_payed": true
                              },
                              "express_type": 9,
                              "status": "TRADE_PAID"
                      }
              }
      }

    我这边只查到这个订单下item_id都是1969841884。没有238248994的记录,你这边有日志吗?
    唯有心静,身外的繁华才不至于扭曲和浮躁。
    • Nova_WY 2022-07-30
      正是因为这个问题,我们这边购买的时候在代码里面看到的是238248994,但是消息推送过来的是1969841884,日志就是你们返回的这些消息
    • Nova_WY 2022-07-30

      这是更新jd-充值卡这个商品的传参

      更新商品参数为:token 04d8fc1222ed86f4e5ed5f457baec6d , query {hide_stock=null, auto_listing_time=null, refund_param={"isSupportVirtualRefund":1}, post_fee=null, ump_level=null, etd_end=null, buy_quota=null, num=null, title=JD-充值卡, join_level_discount=null, item_no=jdddd01, item_weight=0, purchase_right=null, price=1, remove_image_ids=5022432331, sku_images=null, sku_weight=null,null, etd_type=0, hotel_extra=null, summary=null, ump_tags=null, virtual_extra=null, tag_ids=null, quantity=0, quota_cycle=null, item_sku_extends=[{"cost_price":1,"s1":1,"s2":0,"s3":0},{"cost_price":1,"s1":2,"s2":0,"s3":0}], item_id=2382480994, pre_sale_end=null, etd_start=null, etd_days=0, delivery_template_id=null, messages=[{"datetime":0,"editable":false,"multiple":0,"name":"手机号","required":true,"type":"tel"}], image_ids=5022432331, sku_stocks=[{"price":1,"item_no":"","cost_price":1,"weight":null,"skus":[{"k":"面额","kid":0,"v":"100","vid":1}]},{"price":1,"item_no":"","cost_price":1,"weight":null,"skus":[{"k":"面额","kid":0,"v":"50","vid":2}]}], template_id=null, sell_point=null, origin_price=0.01, desc=<br>< img src="https://img01.yzcdn.cn/upload_files/2022/07/28/FvdPWP1eYBWMutHBCqpaWAGY4kQR.png"><br>, is_display=1, cid=null}



      {hide_stock=null, auto_listing_time=null, refund_param={"isSupportVirtualRefund":1}, post_fee=null, ump_level=null, etd_end=null, buy_quota=null, num=null, title=JD-充值卡, join_level_discount=null, item_no=jdddd01, item_weight=0, purchase_right=null, price=1, remove_image_ids=5022432331, sku_images=null, sku_weight=null,null, etd_type=0, hotel_extra=null, summary=null, ump_tags=null, virtual_extra=null, tag_ids=null, quantity=0, quota_cycle=null, item_sku_extends=[{"cost_price":1,"s1":1,"s2":0,"s3":0},{"cost_price":1,"s1":2,"s2":0,"s3":0}], item_id=2382480994, pre_sale_end=null, etd_start=null, etd_days=0, delivery_template_id=null, messages=[{"datetime":0,"editable":false,"multiple":0,"name":"手机号","required":true,"type":"tel"}], image_ids=5022432331, sku_stocks=[{"price":1,"item_no":"","cost_price":1,"weight":null,"skus":[{"k":"面额","kid":0,"v":"100","vid":1}]},{"price":1,"item_no":"","cost_price":1,"weight":null,"skus":[{"k":"面额","kid":0,"v":"50","vid":2}]}], template_id=null, sell_point=null, origin_price=0.01, desc=<br>< img src="https://img01.yzcdn.cn/upload_files/2022/07/28/FvdPWP1eYBWMutHBCqpaWAGY4kQR.png"><br>, is_display=1, cid=null}


    • Nova_WY 回复 Nova_WY 2022-07-30
      我们是在网页抓包看到的商品id是238248994,本以为返回回来的消息商品也是这个。结果成了1969841884,导致订单没法入库

    你下个腾讯会议
    点击链接直接加入会议:
    https://meeting.tencent.com/dm/YqZmJe2u92WJ

    #腾讯会议:198-697-645

    手机一键拨号入会
    +8675536550000,,198697645# (中国大陆)
    +85230018898,,,2,198697645# (中国香港)

    根据您的位置拨号
    +8675536550000 (中国大陆)
    +85230018898 (中国香港)
    唯有心静,身外的繁华才不至于扭曲和浮躁。
    加载更多

    目前还未能准确诊断你的问题。可能是以下这个业务逻辑。

    连锁店铺的总部商品和门店商品都有独立的item_id,你看到的238248994可能是总部item_id(root_item_id),1969841884是网店的item_id。你再验证下。

    唯有心静,身外的繁华才不至于扭曲和浮躁。
    • Nova_WY 2022-07-30
      逻辑好像是这样的,那还有一个疑问就我怎么去查询商品呢?因为这边涉及到发货,所以需要发货的具体商品信息,可以直接拿总部的这个item_id去查吗?查询接口是哪个呢?因为支付后只返回了一个总部的商品id
    • Nova_WY 2022-07-30
      逻辑好像是这样的,那还有一个疑问就我怎么去查询商品呢?因为这边涉及到发货,所以需要发货的具体商品信息,可以直接拿总部的这个item_id去查吗?查询接口是哪个呢?因为支付后只返回了一个总部的商品id
    • Nova_WY 2022-07-30
      找了文档中的很多东西,但是都没找到接口可以查询

    总部商品id查询门店商品id?
    唯有心静,身外的繁华才不至于扭曲和浮躁。

      1跳至
      您需要登录后才可以回帖 登录 | 立即注册

      本版积分规则

      复制链接
      新浪微博
      QQ空间
      微信扫码
      • 回复

      • 评分

      客服工作时间是9:00-18:00,客服妹子当前不在线,若不能及时回复请谅解。试试右上角的搜索吧,论坛有丰富的经验贴、公告贴,相信一定能够帮到您~

      复制成功