试下拿response返回的header中的时间戳进行解密
同城配送接口返回值解密为什么会有成功与失败并存?https://api.weixin.qq.com/cgi-bin/express/intracity/querystore 接口 同样的参数请求了四次返回了如下四次结果: apiResp { resp_ts: 1697583469, resp_data: '{"iv":"poUSBP9ljDrs4S0Y","data":"tnSMq13wZE/f4KmImCcScgl2zSwIV1IWph+9evYeXz003vraSkepSc7pbjYx+ETrlqL6ow1nPuHDwxkYSlQ7MfMSN/lHstCskbCSOOYsNqSA10TnlnZfwmSJXMUm6JhpAeMVO1kb9EyKrn6PAX88nr0ZR4XxUX2b7gbUsUa7UKWiVAcLZXhZhrbHy/MNGDwWSp1Ox7odr2PbgA5CJ4FHF2FEvW8nUh7wg3p2kq2LsoJiE4MI5WfTNcMzuVu1sCwCo4mrHCzFxJJd2YohJIxGXQgYAbZKlwljcT3Y5WriF2IugFKdPj/TfEs4KKiZg7+5yiqM3H6W5gN9aI3FYeDEZ9eh2Po1tUHfb0CtaEYPMQvMUFhSZ9iT8U7OgGSg4+vcM7gx0yVr8/HjqFxam6PnQm9jZWQVmn5pd3S0wxQ1fTOo0r9rmEyqdAYPYN5GxqXraLBELBvE6uhPjJvCySR1d5PIYOzQwP9HYSSxnn8l4cxBQ1cWnclTrPS8ioE0ixd6uQf9GFBv/TzNKdxA2idMJ72z96mIDmGF2PKMJv4/uwFQrSX257IgFptqS3NsghgiGxFxnsCMoAxQC4KdlnYJyR+ngOg+zPOi","authtag":"d0f2BWmdHp4dtuS44DsQPg=="}' } apiResp { resp_ts: 1697583580, resp_data: '{"iv":"Rz2AW/rG+4n9u8ha","data":"bZWKlpzhASH2ucvsVopWaKmsLt47UY2HThqL1PwIuNvhtYO/BLH/6//LVGjeePVJ9zsaBVlM1uzlwCC9oqDCV7mP9npe+/zUa3n6/KgHHqFD9Hy1P2V8dw9UJQpOCEgXEkF0Yhn8UpqYX35aTvl/am4XVg3tPtnYvbhHH3C9TDQToC9FnS9B+iGmNMugBJ2UrPkbnOZWdDlOmbos4GsHcFS0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LvlMOg3rWaSkpu","authtag":"a1xyfwbJ4pCf+ScUKUafgg=="}' } apiResp { resp_ts: 1697583597, resp_data: '{"iv":"GFMKzyml/04NGIix","data":"iRUDngbf8/vGEl4rPHr+aX0MhwTfApA9Upvw429VPA8Mh3unBDmYX5+8l/PYtrBnO0s4476IB6stTuCxVNpqRfwXvUQZP0T6KfPPLicFO7BjYeBWTo8Veqdy86+qFc7NzQ4Ng63g11YKd55DSViy+qQCEW9hYOtpCi9s6mnAo2g1rRNIXMva6PvHKJUFwgYtJLEh64w9FP0NNqlNM7BtMLAxE6Kxf5FIkXJWV3UplQb5TA5WYrxdyi0mKqV998+OyF2CoxGSVtQ+0FMy91N9tbwE7OCIsjknE6P7tfFk9zcge/2r9na6xlqOsKQTsj22BsMWHV3wOz8v94ZFkWa6B8X4B0Te4W+FyIKRw5Fv0z10gGJnJjkTN7hb1i3rJTU28ioTPEVKMwI7fL1SKuo5K5zCnN/E4o6QaZZ6ldhyL8bUOyRa/FqiA2WvBkD8TpdXpGRjvruakuEq96BeqqwzeCjLoVcu8XW2tpwHfmJnG9j87toqYEF7xurr+S0EG0QcDQQsag7KjnptMglwZ46yKUJAyHIQXFvIRu328XBnDsbrH3ByvieBUCvwrDBnsX7vf8VwF9ke6RUKECakY+J1UKgcinrsJPWq","authtag":"BbwoRTp2PqZf5RdMzwaXuw=="}' } https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/getting_started/api_signature.html 然后按照官方node.js的解密方式解密,其中只有第一与第四个结果是解密成功的,第二第三都提示【auth tag验证失败】,这结果预期根本没办法做业务逻辑,而且查运费接口返回的结果是百分之百解密失败的。有解决办法吗这种情况。
2023-10-23同样的问题,我也是不知道参数错误在哪里 {40097 invalid args rid: 65151ed2-03dd6a5d-6c31c5e2}
微信小程序调用同城配送查询运费接口,报错40097参数错误,对比参数后不知道问题出现在哪?接口入参: {user_lng: 126.50927, user_name: "测试11111", user_address: "世茂大道555", user_phone: "15645249306", user_lat: 45.771509, cargo_name: "饭团套餐", wx_store_id: "4000000000000130006", cargo: { cargo_weight: 20, cargo_price: 2100, cargo_num: 1, cargo_name: "饭团套餐", cargo_type: 1 }, use_sandbox: 1 } 接口返参 {"errcode":40097,"errmsg":"invalid args rid: 65143df5-4bce56fb-76a2e9f8"} 麻烦帮忙看下,谢谢
2023-09-28