鉴定代码

gxq323 2009-08-01 09:31:26
<%
t2 = "chinaxxy@126.com" '商户支付宝账户(改成你自己的)
t3 = "iabcg89z2vlxr5pgykuo612f52xhhr6r" '安全校验码(改成你自己的)。登陆支付宝网站->商家工具->右下角.一长窜乱码就是校验码了。

'这儿是MD5的代码,太长了我删了
%>
<%myurl="http://"+request.servervariables("server_name")+request.servervariables("url")%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网店支付宝整合 Http://www.22CN.net.cn 湖南E族网络信息服务中心</title>

<style type="text/css">
<!--
a,body,td {
font-size: 13px;
line-height: 22px;
}
input {
border: 1px solid #000000;
}
-->
</style>

<script>
function regInput(obj, reg, inputStr)
{
var docSel = document.selection.createRange()
if (docSel.parentElement().tagName != "INPUT") return false
oSel = docSel.duplicate()
oSel.text = ""
var srcRange = obj.createTextRange()
oSel.setEndPoint("StartToStart", srcRange)
var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
return reg.test(str)
}
</script>
</head>
<body><%
dim id
id=request("id")
if id ="" then
%>
<table width="100%" border="2" cellpadding="5" cellspacing="1" bordercolor="#0000FF" bgcolor="#FFFFFF">
<form name="wangdaofan" action="<%=myurl%>?id=Confirm" method="POST" onSubmit="return CheckForm();">
<tr align="center" bgcolor="#0000FF">
<td height="35" colspan="2"><strong><font color="#FFFFFF">支付宝在线付款程序</font></strong></td>
</tr>
<tr>
<td width="25%" align="right">金  额:</td>
<td width="75%"><input name="jh" type="text" size="12" maxlength="12" onkeypress = "return regInput(this, /^\d*\.?\d{0,2}$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^\d*\.?\d{0,2}$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^\d*\.?\d{0,2}$/, event.dataTransfer.getData('Text'))">
元(<strong><font color="#0000FF">例:</font></strong>如输入 100.88 就是支付 100元8角8分
)</td>
</tr>
<tr>
<td align="right">用  途:</td>
<td><input name="yt" type="text" size="12" maxlength="12"></td>
</tr>
<tr>
<td align="right">附加说明:</td>
<td><input name="sm" type="text" size="50" maxlength="50"></td>
</tr>
<tr>
<td align="right">您的姓名:</td>
<td><input name="xm" type="text" size="12" maxlength="12"></td>
</tr>
<tr>
<td align="right">联系地址:</td>
<td><input name="dz" type="text" size="50" maxlength="50"></td>
</tr>
<tr>
<td align="right">邮政编码:</td>
<td><input name="yb" type="text" size="12" maxlength="7" onkeypress = "return regInput(this, /^\d*\.?\d{0,2}$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^\d*\.?\d{0,2}$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^\d*\.?\d{0,2}$/, event.dataTransfer.getData('Text'))"></td>
</tr>
<tr>
<td align="right">电  话:</td>
<td><input name="dh" type="text" size="22" maxlength="22" onkeypress = "return regInput(this, /^\d*\.?\d{0,2}$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^\d*\.?\d{0,2}$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^\d*\.?\d{0,2}$/, event.dataTransfer.getData('Text'))"></td>
</tr>
<tr>
<td align="right">手  机:</td>
<td><input name="sj" type="text" size="22" maxlength="33" onkeypress = "return regInput(this, /^\d*\.?\d{0,2}$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^\d*\.?\d{0,2}$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^\d*\.?\d{0,2}$/, event.dataTransfer.getData('Text'))"></td>
</tr>
<tr>
<td height="34" align="right"> </td>
<td><input type="submit" name="Submit" value="提交支付">
 
<input type="reset" name="Submit2" value="重新填写"></td>
</tr>
<tr>
<td colspan="2" align="right">网店支付宝整合由 <a href="http://www.22cn.net.cn" target="_blank"><font color="#0000FF">Http://www.22CN.net.cn</font></a> 提供</td>
</tr>
</FORM>
</table>
<%elseif id="Confirm" then%>
<%
jh=request.form("jh")
yt=request.form("yt")
sm=request.form("sm")
xm=request.form("xm")
dz=request.form("dz")
yb=request.form("yb")
dh=request.form("dh")
sj=request.form("sj")
ranNum=int(9*rnd)+10
iddata=year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&ranNum'生成日期型订单号
%>
<%
t1 = "https://www.alipay.com/payto:" '支付接口
s1 = "0001" 'cmd 命令码
s2 = DelStr(yt) 'subject 商品名称
s3 = DelStr(sm) 'body 商品描述
s4 = iddata 'order_no 商户订单号
s5 = jh 'price 商品单价 0.01~50000.00
s6 = myurl 'url 商品展示网址
s7 = "1" 'type 支付类型 1:商品购买2:服务购买3:网络拍卖4:捐赠
s8 = "1" 'number 购买数量
s9 = "2" 'transport 发货方式 1:平邮2:快递3:虚拟物品
s10 = "" 'ordinary_fee 平邮运费
s11 = "" 'express_fee 快递运费
s12 = "true" 'readonly 交易信息是否只读
s13 = DelStr(sm) 'buyer_msg 买家给卖家的留言
s14 = "" 'buyer 买家Email
s15 = xm 'buyer_name 买家姓名
s16 = DelStr(dz) 'buyer_address 买家地址
s17 = yb 'buyer_zipcode 买家邮编
s18 = dh 'buyer_tel 买家电话号码
s19 = sj 'buyer_mobile 买家手机号码
s20 = "2088002065360282" 'partner 友情通用ID请不要修改,用来统计交易金额的

'初始化各必要变量
INTERFACE_URL = t1+t2 '支付接口
sellerEmail = t2 '商户支付宝账户
keyCode = t3 '安全校验码


str2CreateAc = "cmd" & s1 & "subject" & s2
str2CreateAc = str2CreateAc & "body" & s3
str2CreateAc = str2CreateAc & "order_no" & s4
str2CreateAc = str2CreateAc & "price" & s5
str2CreateAc = str2CreateAc & "url" & s6
str2CreateAc = str2CreateAc & "type" & s7
str2CreateAc = str2CreateAc & "number" & s8
str2CreateAc = str2CreateAc & "transport" & s9
str2CreateAc = str2CreateAc & "ordinary_fee" & s10
str2CreateAc = str2CreateAc & "express_fee" & s11
str2CreateAc = str2CreateAc & "readonly" & s12
str2CreateAc = str2CreateAc & "buyer_msg" & s13
str2CreateAc = str2CreateAc & "seller" & sellerEmail
str2CreateAc = str2CreateAc & "buyer" & s14
str2CreateAc = str2CreateAc & "buyer_name" & s15
str2CreateAc = str2CreateAc & "buyer_address" & s16
str2CreateAc = str2CreateAc & "buyer_zipcode" & s17
str2CreateAc = str2CreateAc & "buyer_tel" & s18
str2CreateAc = str2CreateAc & "buyer_mobile" & s19
str2CreateAc = str2CreateAc & "partner" & s20
str2CreateAc = str2CreateAc & keyCode

acCode = MD5(str2CreateAc)

itemURL = INTERFACE_URL & "?cmd=" & s1
itemURL = itemURL & "&subject=" & Server.HTMLEncode(s2)
itemURL = itemURL & "&body=" & Server.HTMLEncode(s3)
itemURL = itemURL & "&order_no=" & s4
itemURL = itemURL & "&price=" & s5
itemURL = itemURL & "&url=" & s6
itemURL = itemURL & "&type=" & s7
itemURL = itemURL & "&number=" & s8
itemURL = itemURL & "&transport=" & s9
itemURL = itemURL & "&ordinary_fee=" & s10
itemURL = itemURL & "&express_fee=" & s11
itemURL = itemURL & "&readonly=" & s12
itemURL = itemURL & "&buyer_msg=" & Server.HTMLEncode(s13)
itemURL = itemURL & "&buyer=" & Server.HTMLEncode(s14)
itemURL = itemURL & "&buyer_name=" & Server.HTMLEncode(s15)
itemURL = itemURL & "&buyer_address=" & Server.HTMLEncode(s16)
itemURL = itemURL & "&buyer_zipcode=" & s17
itemURL = itemURL & "&buyer_tel=" & s18
itemURL = itemURL & "&buyer_mobile=" & s19
itemURL = itemURL & "&partner=" & s20
itemURL = itemURL & "&ac=" & acCode


'调用方法 DelStr(值),防止SQL注入攻击
Function DelStr(Str)
If IsNull(Str) Or IsEmpty(Str) Then
Str = ""
End If
DelStr = Replace(Str,";","")
DelStr = Replace(DelStr,"'","")
DelStr = Replace(DelStr,"&","")
DelStr = Replace(DelStr," ","")
DelStr = Replace(DelStr," ","")
DelStr = Replace(DelStr,"%20","")
DelStr = Replace(DelStr,"--","")
DelStr = Replace(DelStr,"==","")
DelStr = Replace(DelStr,"<","")
DelStr = Replace(DelStr,">","")
DelStr = Replace(DelStr,"%","")
DelStr = Replace(DelStr,"+","")
DelStr = Replace(DelStr,"顶级","DingJi")
End Function
%>
<table width="100%" border="2" cellpadding="5" cellspacing="1" bordercolor="#0000FF" bgcolor="#FFFFFF">
<tr align="center" bgcolor="#0000FF">
<td height="35" colspan="2"><strong><font color="#FFFFFF">支付宝在线付款信息确认</font></strong></td>
</tr>
<tr>
<td width="25%" align="right">金  额:</td>
<td width="75%"><font color="#FF0000"><%=jh%>元</font></td>
</tr>
<tr>
<td align="right">用  途:</td>
<td><%=yt%></td>
</tr>
<tr>
<td align="right">附加说明:</td>
<td><%=sm%></td>
</tr>
<tr>
<td align="right">支付单号:</td>
<td><%=iddata%></td>
</tr>
<tr>
<td align="right">您的姓名:</td>
<td><%=xm%></td>
</tr>
<tr>
<td align="right">联系地址:</td>
<td><%=dz%></td>
</tr>
<tr>
<td align="right">邮政编码:</td>
<td><%=yb%></td>
</tr>
<tr>
<td align="right">联系电话:</td>
<td><%=dh%></td>
</tr>
<tr>
<td align="right">手  机:</td>
<td><%=sj%></td>
</tr>
<tr>
<td align="right"> </td>
<td><input type="button" name="立即提交" value="立即提交" onClick="location.href='<%=itemURL%>'">
 
<input type="button" name="Submit21" onClick="javascript:history.go(-1)" value="返回修改">
</td>
</tr>
<tr>
<td colspan="2" align="right">网店支付宝整合由 <a href="http://www.22cn.net.cn" target="_blank"><font color="#0000FF">Http://www.22CN.net.cn</font></a> 提供</td>
</tr>
</table>
<%end if%>
</body>
</html>

看看是否可用,毕竟这好像是07年的代码了,我在上面删除了一段MD5算法的代码,和JS验证代码代码太长了
...全文
67 点赞 收藏 4
写回复
4 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
in0512 2009-08-01
很简单,去支付宝下载一个最新的ASP接口就可以了

PS:支付宝现在接口要收费......
回复
gxq323 2009-08-01
这好像不是,那我下载一个去看看
回复
gxq323 2009-08-01
没人做过吗?小弟第一次接触支付宝接口,帮帮忙吧
回复
sy_binbin 2009-08-01
只要是支付宝给的那个DEMO就是好用的

回复
发动态
发帖子
ASP
创建于2007-09-28

2.8w+

社区成员

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
申请成为版主
社区公告
暂无公告