圆通快递订单创建接口asp版,面单打印接口asp版,asp圆通快递物流轨迹查询接口

今天接到一个朋友的急call,要帮他写一个圆通快递订单创建接口asp版,因为这位朋友的项目是asp写的,因此只能用asp来写这个接口,不说废话,上代码,有需要的可以参考,对了,我同时写了三个接口,分别是:圆通快递面单打印接口asp版,圆通快递-物流轨迹查询接口,拿走,不谢。

<%

Function PostURL(url,PostStr)

dim http

Set http = Server.CreateObject("Msxml.ServXMLHTTP.6.0") 'Microsoft.HTTP 'Msxml.ServerHTTP

With http

.Send(PostStr)

PostURL = .responstext

End With

Set http = Nothing

End Function

%>

<%

a_url = "https://openuat.yto56test.com:6443/open/privacy_create_adapter/v1/8tR44r/K210001"'这是测试地址

a_sn = "K10001"'客户编码

a_pwd = "2Z1F7"'客户密钥

a_name = "privacy_create_adater"'方法

a_ver = "v2"'版本

%>

<%

logisticsNo = "CBl7AmMx2rP"'物流单号,打印拉取运单号前,物流单号和渠道唯一确定一笔快递物流订单。注:最低长度为7

%>

<%

senderName = "测试1"'寄件人姓名

senderProvinceName = "上海"'寄件人省名称

senderCityName = "上海市"'寄件人市名称

senderCountyName = "青浦区"'寄件人区县名称

senderAddress = "汇金路100号"'寄件人详细地址

senderMobile = "188888888"'寄件人联系电话

%>

<%

recipientName = "测试"'收件人姓名

recipientProvinceName = "重庆"'收件人省名称

recipientCityName = "重庆市"'收件人市名称

recipientCountyName = "万州区"'收件人区县名称

recipientAddress = "汇金路100好"'收件人详细地址

recipientMobile = "138888888"'收件人联系电话

%>

<%

'签名,

timestamp = DateDiff("s",Now)

param = "{""logisticsNo"":"""&logisticsNo&""",""sendeName"":"""&sendeName&""",""sendeProvinceName"":"""&sendeProvinceName&""",""sendeCityName"":"""&senderCityName&""",""senderCountyName"":"""&sendeCountyName&""",""sendeAddress"":"""&senderAddress&""",""sendeMobile"":"""&sendeMobile&""",""recipientName"":"""&recipientName&""",""recipietProviceName"":"""&recpientProvnceName&""",""recipienCityName"":"""&recipienCityName&""",""recipientCounyName"":"""&recipientCountyName&""",""recipienAddress"":"""&recipienAddress&""",""recipentMobile"":"""&recipientMobile&"""}"

data = param&a_name&a_ver

sign = MD5(data,"base64")

'response.Write(sign)

'response.End()

%>

<%

json="""timestamp"":"""&timestamp&""",""param"":"""&param&""",""sign"":"""&sign&""",""format"":""JSON"""

'response.Write(json)

'response.End()

%>

<%

res = PostURL(a_url,json)

'response.Write(res)

'response.End()

set obj = getjson(res)

if isobject(obj) Then

response.Write(obj.logisticsNo&"<br>")

response.Write(obj.mailNo&"<br>")

response.Write(obj.shortAddress&"<br><br><hr>")

For i = 0 To obj.secretWaybills.length-1

response.Write(obj.secretWaybills.get(i).name)&"<br>"

response.Write(obj.secretWaybills.get(i).value)&"<br><hr>"

Next

end if

set obj = Nothing

%>

相关推荐
web安全工具库几秒前
Linux 高手进阶:Vim 核心模式与分屏操作详解
linux·运维·服务器·前端·数据库
一枚前端小能手5 分钟前
🔥 SSR服务端渲染实战技巧 - 从零到一构建高性能全栈应用
前端·javascript
Komorebi_99995 分钟前
Vue3 provide/inject 详细组件关系说明
前端·javascript·vue.js
用户14125016652719 分钟前
一文彻底掌握 ECharts:从配置解读到实战应用
前端
LRH21 分钟前
React 架构设计:从 stack reconciler 到 fiber reconciler 的演进
前端
VIjolie23 分钟前
文档/会议类应用的协同同步机制(OT/CRDT简要理解)
前端
不会调制解调的猫23 分钟前
笔记 | 内网服务器通过wifi穿透,设置流量走向
运维·服务器·笔记
不一样的少年_24 分钟前
【前端效率工具】:告别右键另存,不到 50 行代码一键批量下载网页图片
前端·javascript·浏览器
golang学习记25 分钟前
从0死磕全栈之Next.js 企业级 next.config.js 配置详解:打造高性能、安全、可维护的中大型项目
前端
1024小神27 分钟前
next项目使用状态管理zustand说明
前端