文档中心
签名认证
更新时间: 2017-11-22 15:29:53 访问次数:20444

调用Winit API时,需使用到两个签名串:

  • 用户签名“sign”:用于标识万邑联账户/卖家;
  • 应用签名“client_sign”:配合使用基础参数“platform”,即创建应用时填写的“应用code”用于标识应用。

签名拼接方法

用户签名,基础参数:sign
按字段名的字母顺序拼接(包括data中的json字符串也按此规则),将token放在字符串的两端并md5加密

用户签名串 = token + action + actionValue + app_key + app_keyValue + data + dataValue + format + formatValue + platform + platformValue + sign_method + sign_methodValue + timestamp + timestampValue + version+ versionValue + token

对以上拼接后的签名串进行MD5运算,并转换成大写的32位签名。
用户签名sign = toUpperCase(MD5(用户签名串)
注:token是由客户/卖家 登陆万邑联->个人中心->获取token,直接可以在万邑联系统后台获得。
应用签名,基础参数:client_sign
按字段名的字母顺序拼接(包括data中的json字符串也按此规则),将client_secret放在字符串的两端

应用签名串 = client_secret + action + actionValue + app_key + app_keyValue + data + dataValue + format + formatValue + platform + platformValue + sign_method + sign_methodValue + timestamp + timestampValue + version+ versionValue + client_secret

对以上拼接后的签名串进行MD5运算,并转换成大写的32位签名。
应用签名client_sign = toUpperCase(MD5(应用签名串))
注:client_secret是由开发者登陆开发者控制台,创建应用时生成,请参照《开发者控制台 操作手册》

示例

  1. {
  2. "action":"createOutboundOrder",
  3. "app_key":"rebecca",
  4. "client_id":"NGRKYWY2YJITYTE2NY00YTBLLWE4YZITYWMWYJEZN2YXMWVK",
  5. "client_sign":"38B87482C92FFEF0F10292B7AFA44087",
  6. "data":{
  7. "address1":"1 Stafford Crt.",
  8. "address2":"aaaaaaa",
  9. "city":"Bayswater North",
  10. "deliveryWayID":"1010520",
  11. "eBayOrderID":"3298473480",
  12. "emailAddress":"abc@winit.com",
  13. "fromBpartnerId":"111",
  14. "insuranceTypeID":1000000,
  15. "isShareOrder":"N",
  16. "phoneNum":"15900001111",
  17. "productList":[
  18. {
  19. "eBayBuyerID":"98877456rere",
  20. "eBayItemID":"3434245",
  21. "eBaySellerID":"99887rtrtr66123",
  22. "eBayTransactionID":"24377766",
  23. "productCode":"LCD-IP4-01",
  24. "productNum":"1",
  25. "specification":""
  26. }
  27. ],
  28. "recipientName":"mingbao",
  29. "region":"WV",
  30. "repeatable":"Y",
  31. "sellerOrderNo":"PowerSellerABC123",
  32. "state":"US",
  33. "warehouseID":1000008,
  34. "zipCode":"25085"
  35. },
  36. "format":"json",
  37. "language":"zh_CN",
  38. "platform":"SELLERERP",
  39. "sign":"090C13832E59BD50543DAD0ACB4E5B6E",
  40. "sign_method":"md5",
  41. "timestamp":"2016-06-16 00:19:26",
  42. "version":"1.0"
  43. }
  1. 用户签名sign:
  2. 89435277FA3BA272DE795559998E-
  3. actioncreateOutboundOrderapp_keyrebeccadata
  4. {
  5. "address1": "1 Stafford Crt.",
  6. "address2": "aaaaaaa",
  7. "city": "Bayswater North",
  8. "deliveryWayID": "1010520",
  9. "eBayOrderID": "3298473480",
  10. "emailAddress": "abc@winit.com",
  11. "insuranceTypeID": 1000000,
  12. "phoneNum": "15900001111",
  13. "productList": [
  14. {
  15. "eBayBuyerID": "98877456rere",
  16. "eBayItemID": "3434245",
  17. "eBaySellerID": "99887rtrtr66123",
  18. "eBayTransactionID": "24377766",
  19. "productCode": "LCD-IP4-01",
  20. "productNum": "1",
  21. "specification": ""
  22. }
  23. ],
  24. "recipientName": "mingbao",
  25. "region": "WV",
  26. "repeatable": "Y",
  27. "sellerOrderNo": "PowerSellerABC123",
  28. "state": "US",
  29. "warehouseID": 1000008,
  30. "zipCode": "25085",
  31. "isShareOrder": "N",
  32. "fromBpartnerId": "111"
  33. }
  34. formatjsonplatformSELLERERPsign_methodmd5timestamp2016-06-16 00:19:26version1.0
  35. 89435277FA3BA272DE795559998E-
  1. 应用签名client_sign:
  2. YME1MJQ0ZMUTMTNMZC00YTDMLWEWM2QTNMY1MDC3OWNJYZQ2MZE0NTKYNZE1MJUWNZE5
  3. actioncreateOutboundOrderapp_keyrebeccadata
  4. {
  5. "address1": "1 Stafford Crt.",
  6. "address2": "aaaaaaa",
  7. "city": "Bayswater North",
  8. "deliveryWayID": "1010520",
  9. "eBayOrderID": "3298473480",
  10. "emailAddress": "abc@winit.com",
  11. "insuranceTypeID": 1000000,
  12. "phoneNum": "15900001111",
  13. "productList": [
  14. {
  15. "eBayBuyerID": "98877456rere",
  16. "eBayItemID": "3434245",
  17. "eBaySellerID": "99887rtrtr66123",
  18. "eBayTransactionID": "24377766",
  19. "productCode": "LCD-IP4-01",
  20. "productNum": "1",
  21. "specification": ""
  22. }
  23. ],
  24. "recipientName": "mingbao",
  25. "region": "WV",
  26. "repeatable": "Y",
  27. "sellerOrderNo": "PowerSellerABC123",
  28. "state": "US",
  29. "warehouseID": 1000008,
  30. "zipCode": "25085",
  31. "isShareOrder": "N",
  32. "fromBpartnerId": "111"
  33. }
  34. formatjsonplatformSELLERERPsign_methodmd5timestamp2016-06-16 00:19:26version1.0
  35. YME1MJQ0ZMUTMTNMZC00YTDMLWEWM2QTNMY1MDC3OWNJYZQ2MZE0NTKYNZE1MJUWNZE5

签名认证工具

您可以点击签名认证工具使用认证工具验证您的签名是否正确

特别说明

生成签名时需要注意一下几点:

  • 签名时参数必须按字母顺序从小到大排序(字典序);
  • 如果参数的值为空不参与签名,如JAVA中参数值为null的,不会参与签名(”” 与 ‘’ 认 为非空,需要参与签名);
  • 参数名区分大小写;
  • 在向WINIT发送HTTP请求时必须使用正确的编码格式(默认UTF-8)
关键词