自定义交易组件,生成售后单api 报错
api url: https://api.weixin.qq.com/shop/ecaftersale/add?access_token={0}
请求体
{
"path": "pages/order/detail?orderid=204068",
"create_time": "2022-12-07 15:56:02",
"openid": "o450G0TveCKqE2fU33DGY1-qDFiM",
"out_order_id": "20221207921351",
"refund_reason_type": 15,
"orderamt": 2,
"product_infos": [
{
"out_sku_id": "47731",
"product_cnt": 1,
"out_product_id": "47731"
}
],
"refund_reason": "其他原因",
"finish_all_aftersale": 1,
"type": 2,
"out_aftersale_id": "14569",
"status": 2
}
报错:
{"errcode":-2,"errmsg":" 参数错误, detail: out_sku_id() with out_product_id() not found in order(3307920997491017728), please check args rid: 639033f6-04228978-30c9470a"}
混淆了新、老接口的数据格式。
注意,不要使用老接口 https://api.weixin.qq.com/shop/aftersale/add?access_token=xxxxxxxxx
新、老接口,请求体的格式差别很大,请仔细检查。
吐槽一下,微信自定义交易组件的文档,真是太混乱了