Dim 时间 As Date = Date.Now
Dim 订单详情 As String="{""Platform"":""电子百世"",""SendContact"":""发件人"",""SendOfficePhone"":""15888888888"",""SendCellPhone"":""15888888888"",""SendState"":""广东省"",""SendCity"":""广州市"",""SendDistrict"":""番禺区"",""SendAddress"":""岭南大道321号"",""ProductTitle"":""物品类别如化妆品"",""Weight"":""2"",""Raddress"":[{""OrderNo"":""T100001111"",""Contact"":""收货人1"",""OfficePhone"":""15888888888"",""CellPhone"":""15888888888"",""State"":""广东省"",""City"":""广州市"",""District"":""番禺区"",""Address"":""岭南大道321号""}]}"
Dim 签名0 As String="13f4a636545c424eappKeyzto001logiTypebuykongbaoorders" & 订单详情 & "timestamp" & 时间 & "13f4a636545c424e"
Dim 被加密= 签名0
Dim 签名 = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(被加密 , "MD5")
Dim hc As new HttpClient("http://kongbao100.cn/OrderSubmit/index.asp")
hc.FormData.Add("appKey","zto001")
hc.FormData.Add("logiType","buykongbao")
hc.FormData.Add("orders",订单详情 )
hc.FormData.Add("timestamp", 时间 )
hc.FormData.Add("sign",签名 )
'Output.Show(hc.GetData)
'{"code":"0","msg":"下单成功","Data":[{"OrderNo":"T100001111","WaybillSn":"","Trackingno":"73120393412531"},{"OrderNo":"T100002","WaybillSn":"","Trackingno":"73120393412529"}]}
'{"code":"1010","msg":"对不起,该商品暂停出售","Data":""}
Dim jo As JObject = JObject.Parse(hc.GetData)
If jo("msg")="下单成功" Then
For Each jt As JToken In jo("Data")
Output.Show("快递单号:" & jt("Trackingno").ToString )
Next
Else
output.Show("错误提醒:"jo("age"))
End If