有赞新零售社区

发帖
API使用问题»下单事件丢失

[API调用-商品/交易] 下单事件丢失

踏雪无痕 2023-10-30 779 浏览 2 评论 | 只看楼主 [打印]
最近遇到用户在有赞渠道的下单后,部分下单事件(trade_TradeCreate)没有收到,只收到买家付款事件(trade_TradePaid)。出现该问题的订单号为:E20231030101943076106183。
用手机打开
收藏 ··· 回复
    千寻   有赞云团队   2023-10-30 | 只看该作者
    您好,辛苦提供下未收到trade_TradeCreate消息的应用信息哈
    • 踏雪无痕 2023-10-31
      没有trade_TradeCreate事件,只收到了trade_TradePaid事件消息。trade_TradePaid事件内容:
      {"msg":"%7B%22delivery_order%22%3A%5B%5D%2C%22order_promotion%22%3A%7B%22item%22%3A
      %5B%5D%2C%22adjust_fee%22%3A%220.00%22%2C%22order%22%3A%5B%5D%7D%2C%22refund_order%22%3A%5B%5D%2C%22full_order_info%22%3A%7B%22address_info%22%3A%7B%22self_fetch_info%22%3A%22%22%2C%22delivery_address%22%3A%22%24110hGey%2F3TSIX%2F%2BM0%2B5h1ivrNV52xh
      J2wKrodMD3sLI%3D%241%24%22%2C%22delivery_postal_code%22%3A%22%22%2C%22receiver_name%22%3A%22%24KVtaBF6NLsBymDaopYLcmg%3D%3D%241%24%22%2C%22delivery_province%22%3A%22%E4%B8%8A%E6%B5%B7%E5%B8%82%22%2C%22delivery_city%22%3A%22%E4%B8%8A%E6%B5%B7%E5%B8%82
      %22%2C%22address_extra%22%3A%22%7B%5C%22areaCode%5C%22%3A%5C%22310105%5C%22%2C%5C%22lon%5C%22%3A121.4437031200105%2C%5C%22lat%5C%22%3A31.223007436409205%7D%22%2C%22delivery_district%22%3A%22%E9%95%BF%E5%AE%81%E5%8C%BA%22%2C%22receiver_tel%22%3A%22%24
      hHm0ftTiiMBM9vDxefJvZA%3D%3D%241%24%22%7D%2C%22remark_info%22%3A%7B%22buyer_message%22%3A%22%22%7D%2C%22pay_info%22%3A%7B%22outer_transactions%22%3A%5B%224200002045202310309370602655%22%5D%2C%22post_fee%22%3A%220.00%22%2C%22total_fee%22%3A%221100.00%
      22%2C%22payment%22%3A%221100.00%22%2C%22transaction%22%3A%5B%222310301019440000890444%22%5D%7D%2C%22buyer_info%22%3A%7B%22outer_user_id%22%3A%22olOiL5ckyic0novMAjhniVQu2m0M%22%2C%22buyer_phone%22%3A%22%24NXhwVMBh%2BH74iTRAlhWmPQ%3D%3D%241%24%22%2C%22
      yz_open_id%22%3A%22kapKodnT632173209734668288%22%2C%22fans_type%22%3A226863%2C%22buyer_id%22%3A486234873%2C%22fans_nickname%22%3A%22%24YbaYOEj25ItjMCHang%2B9%2Fbo9n8KrFYhxOiSo3lyKm1cT7Dmm0Aq3UdjrMaGfE4kZ%241%24%22%2C%22fans_id%22%3A15758904709%7D%2C%
      22orders%22%3A%5B%7B%22is_cross_border%22%3A%22%22%2C%22outer_item_id%22%3A%22Ypc01_35%22%2C%22discount_price%22%3A%2250.00%22%2C%22item_type%22%3A0%2C%22num%22%3A22%2C%22oid%22%3A%222971834938624442415%22%2C%22title%22%3A%22%E9%A2%90%E5%BF%83%E6%8A%
      A4%E5%85%BB%EF%BC%88%E5%B1%85%E5%AE%B6%E4%B8%8A%E9%97%A8%EF%BC%8C%E5%9F%BA%E7%A1%80%E7%94%9F%E6%B4%BB%E6%8A%A4%E7%90%86%EF%BC%89%22%2C%22fenxiao_payment%22%3A%220.00%22%2C%22item_message%22%3A%22%22%2C%22item_no%22%3A%22%22%2C%22buyer_messages%22%3A%
      22%22%2C%22cross_border_trade_mode%22%3A%22%22%2C%22is_present%22%3Afalse%2C%22sub_order_no%22%3A%22%22%2C%22price%22%3A%2250.00%22%2C%22fenxiao_price%22%3A%220.00%22%2C%22total_fee%22%3A%221100.00%22%2C%22alias%22%3A%223nn4uqaflggi8t4%22%2C%22paymen
      t%22%3A%221100.00%22%2C%22item_barcode%22%3A%22Ypc01_35%22%2C%22outer_sku_id%22%3A%22P220621615378772%22%2C%22goods_url%22%3A%22https%3A%2F%2Fh5.youzan.com%2Fv2%2Fshowcase%2Fgoods%3Falias%3D3nn4uqaflggi8t4%22%2C%22customs_code%22%3A%22%22%2C%22item_i
      d%22%3A1850646185%2C%22sku_properties_name%22%3A%22%5B%7B%5C%22k%5C%22%3A%5C%22%E5%A5%97%E9%A4%90%E7%B1%BB%E5%9E%8B%5C%22%2C%5C%22k_id%5C%22%3A16977%2C%5C%22v%5C%22%3A%5C%22%E9%95%BF%E5%AE%81%E3%80%81%E6%99%AE%E9%99%80%E3%80%81%E5%98%89%E5%AE%9A%5C%2
      2%2C%5C%22v_id%5C%22%3A95730638%7D%5D%22%2C%22sku_id%22%3A4732478875%2C%22pic_path%22%3A%22https%3A%2F%2Fimg01.yzcdn.cn%2Fupload_files%2F2023%2F07%2F26%2FFt17TdWchD_Al6Qn9n-HM-4vFfHm.png%22%2C%22sku_no%22%3A%22%22%2C%22points_price%22%3A%220%22%2C%22
      sku_barcode%22%3A%22P220621615378772%22%7D%5D%2C%22source_info%22%3A%7B%22is_offline_order%22%3Afalse%2C%22book_key%22%3A%22a5664711-5c1f-4915-afb1-cb3217c91726%22%2C%22source%22%3A%7B%22platform%22%3A%22other%22%2C%22wx_entrance%22%3A%22merchant_xcx
      %22%7D%7D%2C%22order_info%22%3A%7B%22consign_time%22%3A%22%22%2C%22order_extra%22%3A%7B%22is_from_cart%22%3A%22false%22%2C%22is_points_order%22%3A%220%22%7D%2C%22created%22%3A%222023-10-30+10%3A19%3A43%22%2C%22status_str%22%3A%22%E5%B7%B2%E6%94%AF%E4
      %BB%98%22%2C%22expired_time%22%3A%222023-10-31+10%3A19%3A43%22%2C%22success_time%22%3A%22%22%2C%22type%22%3A0%2C%22confirm_time%22%3A%22%22%2C%22tid%22%3A%22E20231030101943076106183%22%2C%22pay_time%22%3A%222023-10-30+10%3A19%3A49%22%2C%22update_time
      %22%3A%222023-10-30+10%3A19%3A50%22%2C%22is_retail_order%22%3Atrue%2C%22team_type%22%3A7%2C%22pay_type%22%3A10%2C%22refund_state%22%3A0%2C%22close_type%22%3A0%2C%22order_tags%22%3A%7B%22is_member%22%3Atrue%2C%22is_secured_transactions%22%3Atrue%2C%22
      is_payed%22%3Atrue%7D%2C%22express_type%22%3A0%2C%22status%22%3A%22TRADE_PAID%22%7D%7D%7D","kdtName":{替代处理}","kdtId":"91675776","rootKdtId":"91737080","msgId":"60a00270-f68f-4dfb-99e7-c0a1d18da162","type":"trade_TradePa
      id","version":1698632391,"id":"E20231030101943076106183","status":"TRADE_PAID"}
    • 踏雪无痕 2023-10-31
      后续还陆续收到了:WAIT_SELLER_SEND_GOODS,WAIT_BUYER_CONFIRM_GOODS事件。

    千寻   有赞云团队   2023-10-31 | 只看该作者
    您好,推送失败,需要开发者自查下哈
    responseCode=400, errorMsg=HTTP请求status异常或返回值不包含success, returnValue=400 Bad Request: invalid header value, parseSuccess=true
    • 踏雪无痕 2023-10-31
      应用服务没看到相关的报错信。能把当时的请求的信息给一下吗?请求头和请求体。
    • 千寻 回复 踏雪无痕 2023-10-31
      您好,在颐家测试应用 中类目能力-消息记录中查看哈

      {"msg":"%7B%22delivery_order%22%3A%5B%5D%2C%22order_promotion%22%3A%7B%22item%22%3A%5B%5D%2C%22adjust_fee%22%3A%220.00%22%2C%22order%22%3A%5B%5D%7D%2C%22refund_order%22%3A%5B%5D%2C%22full_order_info%22%3A%7B%22address_info%22%3A%7B%22self_fetch_info%22%3A%22%22%2C%22delivery_address%22%3A%22%24110hGey%2F3TSIX%2F%2BM0%2B5h1ivrNV52xhJ2wKrodMD3sLI%3D%241%24%22%2C%22delivery_postal_code%22%3A%22%22%2C%22receiver_name%22%3A%22%24KVtaBF6NLsBymDaopYLcmg%3D%3D%241%24%22%2C%22delivery_province%22%3A%22%E4%B8%8A%E6%B5%B7%E5%B8%82%22%2C%22delivery_city%22%3A%22%E4%B8%8A%E6%B5%B7%E5%B8%82%22%2C%22address_extra%22%3A%22%7B%5C%22areaCode%5C%22%3A%5C%22310105%5C%22%2C%5C%22lon%5C%22%3A121.4437031200105%2C%5C%22lat%5C%22%3A31.223007436409205%7D%22%2C%22delivery_district%22%3A%22%E9%95%BF%E5%AE%81%E5%8C%BA%22%2C%22receiver_tel%22%3A%22%24hHm0ftTiiMBM9vDxefJvZA%3D%3D%241%24%22%7D%2C%22remark_info%22%3A%7B%22buyer_message%22%3A%22%22%7D%2C%22pay_info%22%3A%7B%22outer_transactions%22%3A%5B%5D%2C%22deduction_real_pay%22%3A110000%2C%22real_payment%22%3A%220.00%22%2C%22post_fee%22%3A%220.00%22%2C%22deduction_pay%22%3A0%2C%22deduct_value_card_pay%22%3A0%2C%22deduct_gift_card_pay%22%3A0%2C%22phase_payments%22%3A%5B%5D%2C%22total_fee%22%3A%221100.00%22%2C%22payment%22%3A%221100.00%22%2C%22transaction%22%3A%5B%5D%7D%2C%22buyer_info%22%3A%7B%22outer_user_id%22%3A%22olOiL5ckyic0novMAjhniVQu2m0M%22%2C%22buyer_phone%22%3A%22%24NXhwVMBh%2BH74iTRAlhWmPQ%3D%3D%241%24%22%2C%22yz_open_id%22%3A%22kapKodnT632173209734668288%22%2C%22fans_type%22%3A226863%2C%22buyer_id%22%3A486234873%2C%22fans_nickname%22%3A%22%24YbaYOEj25ItjMCHang%2B9%2Fbo9n8KrFYhxOiSo3lyKm1cT7Dmm0Aq3UdjrMaGfE4kZ%241%24%22%2C%22fans_id%22%3A15758904709%7D%2C%22orders%22%3A%5B%7B%22is_cross_border%22%3A%22%22%2C%22outer_item_id%22%3A%22Ypc01_35%22%2C%22discount_price%22%3A%2250.00%22%2C%22item_type%22%3A0%2C%22num%22%3A22%2C%22oid%22%3A%222971834938624442415%22%2C%22title%22%3A%22%E9%A2%90%E5%BF%83%E6%8A%A4%E5%85%BB%EF%BC%88%E5%B1%85%E5%AE%B6%E4%B8%8A%E9%97%A8%EF%BC%8C%E5%9F%BA%E7%A1%80%E7%94%9F%E6%B4%BB%E6%8A%A4%E7%90%86%EF%BC%89%22%2C%22fenxiao_payment%22%3A%220.00%22%2C%22item_message%22%3A%22%22%2C%22item_no%22%3A%22%22%2C%22buyer_messages%22%3A%22%22%2C%22cross_border_trade_mode%22%3A%22%22%2C%22is_present%22%3Afalse%2C%22sub_order_no%22%3A%22%22%2C%22price%22%3A%2250.00%22%2C%22fenxiao_price%22%3A%220.00%22%2C%22total_fee%22%3A%221100.00%22%2C%22alias%22%3A%223nn4uqaflggi8t4%22%2C%22payment%22%3A%221100.00%22%2C%22item_barcode%22%3A%22Ypc01_35%22%2C%22outer_sku_id%22%3A%22P220621615378772%22%2C%22goods_url%22%3A%22https%3A%2F%2Fh5.youzan.com%2Fv2%2Fshowcase%2Fgoods%3Falias%3D3nn4uqaflggi8t4%22%2C%22customs_code%22%3A%22%22%2C%22item_id%22%3A1850646185%2C%22sku_properties_name%22%3A%22%5B%7B%5C%22k%5C%22%3A%5C%22%E5%A5%97%E9%A4%90%E7%B1%BB%E5%9E%8B%5C%22%2C%5C%22k_id%5C%22%3A16977%2C%5C%22v%5C%22%3A%5C%22%E9%95%BF%E5%AE%81%E3%80%81%E6%99%AE%E9%99%80%E3%80%81%E5%98%89%E5%AE%9A%5C%22%2C%5C%22v_id%5C%22%3A95730638%7D%5D%22%2C%22sku_id%22%3A4732478875%2C%22pic_path%22%3A%22https%3A%2F%2Fimg01.yzcdn.cn%2Fupload_files%2F2023%2F07%2F26%2FFt17TdWchD_Al6Qn9n-HM-4vFfHm.png%22%2C%22sku_no%22%3A%22%22%2C%22points_price%22%3A%220%22%2C%22sku_barcode%22%3A%22P220621615378772%22%7D%5D%2C%22source_info%22%3A%7B%22order_source_code%22%3A%22merchant_xcx%22%2C%22is_offline_order%22%3Afalse%2C%22book_key%22%3A%22a5664711-5c1f-4915-afb1-cb3217c91726%22%2C%22order_source%22%3A%22%E5%BE%AE%E4%BF%A1-%E5%95%86%E5%AE%B6%E5%B0%8F%E7%A8%8B%E5%BA%8F%22%2C%22biz_source%22%3A%22%22%2C%22source%22%3A%7B%22platform%22%3A%22other%22%2C%22wx_entrance%22%3A%22merchant_xcx%22%7D%2C%22order_mark%22%3A%22wx_shop%22%7D%2C%22order_info%22%3A%7B%22consign_time%22%3A%22%22%2C%22order_extra%22%3A%7B%22is_from_cart%22%3A%22false%22%2C%22is_points_order%22%3A%220%22%7D%2C%22created%22%3A%222023-10-30+10%3A19%3A43%22%2C%22status_str%22%3A%22%E5%BE%85%E6%94%AF%E4%BB%98%22%2C%22expired_time%22%3A%222023-10-31+10%3A19%3A43%22%2C%22success_time%22%3A%22%22%2C%22type%22%3A0%2C%22confirm_time%22%3A%22%22%2C%22tid%22%3A%22E20231030101943076106183%22%2C%22pay_time%22%3A%22%22%2C%22update_time%22%3A%222023-10-30+10%3A19%3A43%22%2C%22is_retail_order%22%3Atrue%2C%22team_type%22%3A7%2C%22pay_type%22%3A0%2C%22refund_state%22%3A0%2C%22close_type%22%3A0%2C%22order_tags%22%3A%7B%22is_member%22%3Atrue%2C%22is_secured_transactions%22%3Atrue%7D%2C%22express_type%22%3A0%2C%22status%22%3A%22WAIT_BUYER_PAY%22%7D%7D%7D","kdt_name":"颐家(上海)医疗养老服务","test":false,"sign":"661e51b4e9284f5d9bda8d5c79edad3d","sendCount":1,"type":"trade_TradeCreate","version":1698632383,"client_id":"f0a9a2a9f6caf0d2a6","mode":1,"kdt_id":91675776,"id":"E20231030101943076106183","msg_id":"2b6ae3c2-c94c-4625-bb87-cf1a30bbe3d8","root_kdt_id":91737080,"status":"WAIT_BUYER_PAY"}
    • 踏雪无痕 回复 千寻 2023-11-01
      只能看到消息体,无法看到请求头的内容。我希望能够检查一下请求头的数据。
      我这边是根据请求头中的“"Event-Sign”,“Event-Type”和“Client-Id”做一些业务处理,所以要求这几个请求头的字段都是必填项。

      而且后台查看消息时,消息里面包含了
      2023-10-30 10:20:01400HTTP请求status异常或返回值不包含success400 Bad Request: invalid header value

    • 千寻 回复 踏雪无痕 2023-11-01
      您好,参考文档https://doc.youzanyun.com/resource/doc/3117/3117自查下代码逻辑哈
    • 踏雪无痕 回复 千寻 2023-11-01
      就是参考这篇文章开发的。我这边的问题是,什么情况下,请求头的参数是空的,导致了我这边无法正常处理。按照这篇文章,请求头参数都应该要有数值的。
      我重发消息后,请求头的数据都有值了,能够正常处理了。

      我主要担心后续是否还会发生请求头没有这三个数据的情况吗?
    • 千寻 回复 踏雪无痕 2023-11-02
      您好,400表示客户端请求有语法错误。
      建议参考一下消息推送配置对接:https://doc.youzanyun.com/doc#/content/35701/36476 中的推送规则
    加载更多

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

    本版积分规则

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

    • 评分

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

    复制成功