?? alipay_payto.asp
字號(hào):
<!--#include file="Alipay_md5.asp"-->
<%
Class creatAlipayItemURL
'獲得最終的購(gòu)買url
Public Function creatAlipayItemURL(t1,t4,t5,service,agent,partner,sign_type,subject,body,out_trade_no,price,discount,show_url,quantity,payment_type,logistics_type,logistics_fee,logistics_payment,logistics_type_1,logistics_fee_1,logistics_payment_1,seller_email,notify_url,return_url,key)
Dim itemURL
dim INTERFACE_URL,imgsrc,imgtitle
'初始化各必要變量
INTERFACE_URL = t1 '支付接口
imgsrc = t4 '支付寶按鈕圖片
imgtitle = t5 '按鈕懸停說(shuō)明
'Add by sunzhizhi 2006-5-10
mystr = Array("service="&service,"agent="&agent,"partner="&partner,"subject="&subject,"body="&body,"out_trade_no="&out_trade_no,"price="&price,"discount="&discount,"show_url="&show_url,"quantity="&quantity,"payment_type="&payment_type,"logistics_type="&logistics_type,"logistics_fee="&logistics_fee,"logistics_payment="&logistics_payment,"logistics_type_1="&logistics_type_1,"logistics_fee_1="&logistics_fee_1,"logistics_payment_1="&logistics_payment_1,"seller_email="&seller_email,"notify_url="¬ify_url,"return_url="&return_url)
Count=ubound(mystr)
For i = Count TO 0 Step -1
minmax = mystr( 0 )
minmaxSlot = 0
For j = 1 To i
mark = (mystr( j ) > minmax)
If mark Then
minmax = mystr( j )
minmaxSlot = j
End If
Next
If minmaxSlot <> i Then
temp = mystr( minmaxSlot )
mystr( minmaxSlot ) = mystr( i )
mystr( i ) = temp
End If
Next
For j = 0 To Count Step 1
value = SPLIT(mystr( j ), "=")
If value(1)<>"" then
If j=Count Then
md5str= md5str&mystr( j )
Else
md5str= md5str&mystr( j )&"&"
End If
End If
Next
md5str=md5str&key
' response.write md5str
sign=md5(md5str)
itemURL = itemURL&INTERFACE_URL
For j = 0 To Count Step 1
value = SPLIT(mystr( j ), "=")
If value(1)<>"" then
itemURL= itemURL&mystr( j )&"&"
End If
Next
itemURL = itemURL&"sign="&sign&"&sign_type="&sign_type
response.write itemURL
creatAlipayItemURL = itemURL
End Function
Public Function get_AlipayButtonURL(itemURL,imgtitle,imgsrc)
dim responseText1
responseText1 = responseText1 & "<a href='" & itemURL & "' target='_blank'>" '購(gòu)買網(wǎng)址
responseText1 = responseText1 & "<img alt='" & imgtitle & "' src='" '圖片說(shuō)明
responseText1 = responseText1 & imgsrc '圖片地址
responseText1 = responseText1 & "' align='absmiddle' border='0'/></a>"
get_AlipayButtonURL=responseText1
End Function
End Class
%>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -