问题描述
手机淘宝很多页面都有sign。但不知道如何算出的。看了api的帮助文档,按它上面的md5算不出啊?md5(appSecret+api+v+imei+imsi+md5(data)+t)有人知道吗?RemoteAddress:140.205.160.4:80RequestURL:http://api.m.taobao.com/h5/mtop.trade.buildorder.h5/3.0/?appKey=12574478&t=1443487806246&sign=0c21b6fd57ee7e2c5a222564925239c3&api=mtop.trade.buildOrder.h5&v=3.0&type=originaljson&timeout=8000&isSec=1&dataType=json&ecode=0&ttid=%23t%23ot%23%23_h5_2014RequestMethod:POSTStatusCode:200OKRequestHeadersviewsourceAccept:application/jsonAccept-Encoding:gzip,deflateAccept-Language:zh-CN,zh;q=0.8Cache-Control:no-cacheConnection:keep-aliveContent-Length:401Content-type:application/x-www-form-urlencodedCookie:tg=0;lzstat_uv=27989628703266874415|2618858@2618227@2634113;mt=ci%3D-1_0;supportWebp=false;m_user_unitinfo=unit|unsz;v=0;cna=DGoRDKZnlhcCAbbwmGgVOqJo;wud=wud;tb_token=Qz23Iain4oo;ockeqeudmj=mSIeKU4%3D;w_tb_nick=lilf1121;imewweoriw=3%2Ft2An41Q0O3saHtPHrgi7kX2xEfvZyHkcZln1aZgwo%3D;munb=23563632;WAPFDFDTGFG=%2B4cMKKP%2B8PI%2BMLYQtFTwExG%2BAw%3D%3D;_w_app_lg=18;_w_al_f=1;uc3=nk2=D8rqcZjDwbc%3D&id2=UUtO%2FnUHqNY%3D&vt3=F8dASMlJt3MC%2BTGySoc%3D&lg2=UtASsssmOIJ0bQ%3D%3D;uc1=cookie14=UoWzWiy%2BkcUJ8w%3D%3D&cookie21=Vq8l%2BKCLiv4SBchkaUzEaw%3D%3D&cookie15=V32FPkk%2Fw0dUvg%3D%3D;lgc=lilf1121;tracknick=lilf1121;cookie2=1ca9088272caa4485727503a8c729435;sg=122;cookie1=AVcUsmbMK8O7UZoiHrd9l5MeRSBs368zC7QFJF05AQk%3D;ntm=0;unb=23563632;t=0548f56b6cc1e7bd03c591558a7fa0a5;_cc=W5iHLLyFfA%3D%3D;l_g=Ug%3D%3D;nk=lilf1121;cookie17=UUtO%2FnUHqNY%3D;m_unitapi_v=1443429110355;_m_h5_tk=d6c50acd48f38a042cda9c6b98cca810_1443491355280;_m_h5_tk_enc=473ce2fa9a8cab9225cd8fd66dff94a2;l=Ampqwj81CVB4hxLJJJOQpJibst4M0-41;isg=1A5E990C5EF899741F24CA0FE5385E20Host:api.m.taobao.comOrigin:http://h5.m.taobao.comPragma:no-cacheReferer:http://h5.m.taobao.com/cart/order.html?itemId=522021443596&item_num_id=522021443596&_input_charset=utf-8&buyNow=true&v=0&quantity=1&skuId=3109541778174&exParams=%7B%22id%22%3A%22522021443596%22%2C%22spm%22%3A%22a219p.7437207.0.0%22%7DUser-Agent:Mozilla/5.0(WindowsNT5.1)AppleWebKit/537.36(KHTML,likeGecko)Chrome/38.0.2125.122Safari/537.36SE2.XMetaSr1.0appKey:12574478t:1443487806246sign:0c21b6fd57ee7e2c5a222564925239c3api:mtop.trade.buildOrder.h5v:3.0type:originaljsontimeout:8000isSec:1dataType:jsonecode:0ttid:#t#ot##_h5_2014data:{"itemId":"522021443596","item_num_id":"522021443596","_input_charset":"utf-8","buyNow":"true","v":"0","quantity":"1","skuId":"3109541778174","exParams":"{"id":"522021443596","spm":"a219p.7437207.0.0"}","ttid":"#t#ot##_h5_2014"}要求算出sign=0c21b6fd57ee7e2c5a222564925239c3。有高手是如何算的嘛?请不要贴api帮助,好像是通过cookiedata和t一起。但不知道他们如何算?data先md5?再拼装起来md5吗?-----------------第二个sign=ef935481cb01d5ad7a8aed31f43d8c2d---------------RemoteAddress:106.11.16.92:80RequestURL:http://unsz.api.m.taobao.com/h5/mtop.order.queryorderdetail/1.0/?v=1.0&api=mtop.order.queryOrderDetail&appKey=12574478&t=1443490765492&callback=mtopjsonp1&type=jsonp&sign=ef935481cb01d5ad7a8aed31f43d8c2d&data=%7B%22orderId%22%3A%221294825376803236%22%2C%22archive%22%3A%22false%22%7DRequestMethod:GETStatusCode:200OKRequestHeadersviewsourceAccept:*/*Accept-Encoding:gzip,deflate,sdchAccept-Language:zh-CN,zh;q=0.8Cache-Control:no-cacheConnection:keep-aliveCookie:tg=0;lzstat_uv=27989628703266874415|2618858@2618227@2634113;mt=ci%3D-1_0;supportWebp=false;m_user_unitinfo=unit|unsz;v=0;cna=DGoRDKZnlhcCAbbwmGgVOqJo;wud=wud;tb_token=Qz23Iain4oo;ockeqeudmj=mSIeKU4%3D;w_tb_nick=lilf1121;imewweoriw=3%2Ft2An41Q0O3saHtPHrgi7kX2xEfvZyHkcZln1aZgwo%3D;munb=23563632;WAPFDFDTGFG=%2B4cMKKP%2B8PI%2BMLYQtFTwExG%2BAw%3D%3D;_w_app_lg=18;_w_al_f=1;uc3=nk2=D8rqcZjDwbc%3D&id2=UUtO%2FnUHqNY%3D&vt3=F8dASMlJt3MC%2BTGySoc%3D&lg2=UtASsssmOIJ0bQ%3D%3D;lgc=lilf1121;tracknick=lilf1121;ntm=0;t=0548f56b6cc1e7bd03c591558a7fa0a5;_cc=W5iHLLyFfA%3D%3D;m_unitapi_v=1443429110355;_m_h5_tk=d6c50acd48f38a042cda9c6b98cca810_1443491355280;_m_h5_tk_enc=473ce2fa9a8cab9225cd8fd66dff94a2;cookie2=1ce6461b6e7a2e882067642cb5dc2fee;l=AlBQDRG/86ZupbjX-hEaEsW0KJCiNDRj;linezing_session=NX090bNCFUPvHNjq4fzxEeX4_1443490734937Ujm9_1;isg=1C68E8F0B067FA0DCB52A049AB498075Host:unsz.api.m.taobao.comPragma:no-cacheReferer:http://h5.m.taobao.com/awp/mtb/olist.htm?sta=5User-Agent:Mozilla/5.0(WindowsNT5.1)AppleWebKit/537.36(KHTML,likeGecko)Chrome/38.0.2125.122Safari/537.36SE2.XMetaSr1.0QueryStringParametersviewsourceviewURLencodedv:1.0api:mtop.order.queryOrderDetailappKey:12574478t:1443490765492callback:mtopjsonp1type:jsonpsign:ef935481cb01d5ad7a8aed31f43d8c2ddata:{"orderId":"1294825376803236","archive":"false"}
解决方案
解决方案二:
参考我csdn博客里面webapihamc的文章,那个就是抄的支付宝实现,签名之前要排序
解决方案三:
谢谢starfd。。。后面发现方法了。封贴!!!
解决方案四:
很抱歉,统一回复下好久的私信。发Q邮件吧,就是注册号后面一串数字了。呵呵。。。