收藏
回答

自定义交易组件生成订单报金额计算错误?

计算过金额没错啊,{"errcode":1010040,"errmsg":"订单金额计算错误 rid: 6246d51f-01c1c10e-3103fd57"}

{

    "address_info":{

        "detailed_address":"陕西省西安市新城区测试",

        "tel_number":"13530086559",

        "receiver_name":"吴明"

    },

    "create_time":"2022-04-01 18:34",

    "fund_type":1,

    "openid":"o4urn5TMsCJxV7gAEorlq9uxo3Qw",

    "expire_time":"1648811040",

    "order_detail":{

        "price_info":{

            "freight":1600,

            "additional_price":1500,

            "order_price":9632

        },

        "product_infos":[

            {

                "out_sku_id":"1491693369080709121",

                "product_cnt":1,

                "head_img":"https://ishop-20200723.oss-cn-beijing.aliyuncs.com/1/material/dd1e5de5-ea9e-4118-9ffb-b43365b44b09.jpg",

                "title":"假绵羊虾 吃藻 海缸清道夫 工具生物 易养",

                "sale_price":3312,

                "path":"/pages/goods/goods-detail/index?id=1491693369068126209",

                "out_product_id":"1491693369068126209",

                "sku_real_price":3312

            },

            {

                "out_sku_id":"1375265876317372418",

                "product_cnt":1,

                "head_img":"https://ishop-20200723.oss-cn-beijing.aliyuncs.com/1/material/0c1da2f7-7c3e-4531-95dd-030771123b36.jpg",

                "title":"三点白 雀鲷类 喜欢海葵 活跃 海水珊瑚缸饲养 闯缸易养 黑色 白点 ",

                "sale_price":3220,

                "path":"/pages/goods/goods-detail/index?id=1375016428236505090",

                "out_product_id":"1375016428236505090",

                "sku_real_price":3220

            }

        ]

    },

    "scene":"1037",

    "out_order_id":"1501239919125479426"

}

最后一次编辑于  2022-04-01
回答关注问题邀请回答
收藏

1 个回答

  • Leeo
    Leeo
    2022-04-02

    2:生成业务订单时,微信测会对金额进行校验,请确保金额相关信息满足: sum(sku_real_price) + freight = order_price = sku.sale_price * cnt +freight-discounted_price+additional_price 否则将生成订单失败,其中sku_real_price为订单中某一类SKU的实付款(单个SKU标价SKU个数 - 单个SKU优惠价格SKU个数)。

    2022-04-02
    有用 1
    回复 2
    • 子非鱼
      子非鱼
      2022-04-02
      感谢,又重新仔细看了下,已经可以了,但是现在又提示 {"errcode":1010004,"errmsg":"pay_info字段异常,请检查json及字段合法性 rid: 6247bb8b-6fcb232c-4ccecb74"}
      2022-04-02
      回复
    • Leeo
      Leeo
      2022-04-02回复子非鱼
      仔细看文档,你提交的数据里面没有pay_info,这是必传的
      2022-04-02
      回复
登录 后发表内容