?? receive2.asp
字號(hào):
<!--#include file="conn.asp"-->
<!--#include file="md52.asp"-->
<!--#include file="webconfig.asp"-->
<html><head><title><%=webname%>--傭金計(jì)劃</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!--#include file="bjxhead.asp"-->
<table width="760" align="center" border="0" cellspacing="0" cellpadding="0" class="table-zuoyou" bordercolor="#CCCCCC">
<tr>
<td width="100%" valign="top" align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF">
<table width="100%" align="center" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="images/class_bg.jpg" height=50> <img src="images/ring02.gif" width="23" height="15" align="absmiddle"> <a href=index.asp><%=webname%></a> >> 支付平臺(tái)</td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width=100% border="0" cellpadding="5" cellspacing="0" class="table-xia" bgColor=#f1f1f1>
<TR><TD bgColor=#ffffff colspan=19 height=1></TD>
<tr>
<td width="88%" colspan="8">
<%
'該頁面為支付完成后獲取返回的參數(shù)及處理.....
'獲取參數(shù)
v_oid=request("v_oid")
v_pmode=request("v_pmode")
v_pstatus=request("v_pstatus")
v_pstring=request("v_pstring")
v_md5info=request("v_md5info")
v_amount=request("v_amount")
v_moneytype=request("v_moneytype")
v_md5money=request("v_md5money")
v_md5=request("v_md5")
key="test"
if request("v_md5info")="" then
response.Write("v_md5info:空值")
response.end
end if
'md5校驗(yàn)
text = v_oid&v_pstatus&v_amount&v_moneytype&key
md5text = trim(md5(text))
'按md5檢驗(yàn)情況輸出結(jié)果 Ucase轉(zhuǎn)換為大寫
if Ucase(md5text)<>Ucase(v_md5) then
response.write("error")
else
response.write("received")
'或response.write "sent',依據(jù)商品物流特征決定。
'提示:僅是對(duì)校驗(yàn)碼校驗(yàn)通過不表示該支付結(jié)果是成功只意味著該信息是由網(wǎng)銀傳回
'校驗(yàn)成功需對(duì)傳回的v_pstatus參數(shù)做判斷,其中1或20都意味著支付成功(只是支付狀態(tài)分非實(shí)時(shí)和實(shí)時(shí)兩種),30表示支付失敗
'如果商戶涉及實(shí)時(shí)售卡,請(qǐng)對(duì)返回的金額與數(shù)據(jù)庫(kù)中原始金額做大小判斷,以防惡意行為
'操作數(shù)據(jù)庫(kù)
'''''''''''''''''''''開始寫入數(shù)據(jù)庫(kù)''''''''''''''''''''
'cn.close
'set cn=nothing
'set rs=nothing
'-----------------------------------------------
'若有錯(cuò)誤發(fā)生
If Err.Number <> 0 Then
Response.Write "error" & Err.Number & "<br>"
Response.Write "error" & Err.Source & "<br>"
Response.Write "error" & Err.Description & "<br>"
Else
End If
'-----------------------------------------------
'關(guān)閉資料庫(kù)
'-----------------------------------------------
end if
%>
<!--
以下是打印出所有接收數(shù)據(jù)的結(jié)果,供編程人員參考
-->
<table width="93%" border="0">
<tr>
<td> <p>
<%if session("v_oid")=v_oid then%>
<b><font color="#FF0000">提示:</font> 您網(wǎng)上在線支付情況反饋如下:</b><br>
此次交易編號(hào): <%=v_oid%><br>
支付金額:<%=v_amount%><br>
<% if v_pstatus=1 then
zhuangtai = "支付已提交,但已對(duì)您的非實(shí)時(shí)銀行卡已經(jīng)進(jìn)行扣款 "
%>
支付已提交,但已對(duì)您的非實(shí)時(shí)銀行卡已經(jīng)進(jìn)行扣款
<%elseif v_pstatus=20 then
zhuangtai = "在線支付已經(jīng)支付成功"
%>
在線支付已經(jīng)支付成功
<%elseif v_pstatus=30 then
zhuangtai = "在線支付失敗!"
%>
在線支付失敗!
<%end if%>
<br>
<%
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from BJX_card_dingdan where dingdanhao='"&v_oid&"' " ,conn,1,1
if rs.eof And rs.bof then
response.write "<script language=javascript>alert('系統(tǒng)出錯(cuò)!');window.close();</script>"
response.end
else
bookid=rs("bookid")
bookcount=rs("bookcount")
card_dingdanid=rs("card_dingdanid")
rs.Close
set rs=nothing
end if
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from BJX_card where bookid="&bookid&" ",conn,1,3
if rs.eof And rs.bof then
response.write "<script language=javascript>alert('系統(tǒng)缺貨!');window.close();</script>"
response.end
else
i=0
ii=""
do while not rs.eof
ii=ii&"卡號(hào):"&rs("cardhao")&" "
Response.Write "卡號(hào):"&rs("cardhao")&" "
ii=ii&"密碼:"&rs("cardmima")&"<br>"
Response.Write "密碼:"&rs("cardmima")&"<br>"
rs("used")=1
rs("card_dingdanid")=card_dingdanid
rs.Update
i=i+1
if i>=bookcount then Exit Do
rs.movenext
loop
rs.Close
set rs=nothing
end if
set rs=server.CreateObject("adodb.recordset")
rs.Open "select mailaddress,mailusername,mailuserpass,mailname,mailsend from BJX_config",conn,1,1
mailaddress=rs("mailaddress")
mailusername=rs("mailusername")
mailuserpass=rs("mailuserpass")
mailname=rs("mailname")
mailsend=rs("mailsend")
rs.close
set rs=nothing
'發(fā)送郵件
'if Forum_Setting(47)=1 then
on error resume next
'發(fā)送注冊(cè)郵件
topic="您在" & webname & "訂購(gòu)的卡號(hào)和密碼"
mailbody="<html>"
mailbody=mailbody & "<title>卡號(hào)和密碼</title>"
mailbody=mailbody & "<body>"
mailbody=mailbody & "<TABLE border=0 width='95%' align=center><TBODY><TR>"
mailbody=mailbody & "<TD valign=middle align=top>"
mailbody=mailbody & trim(session("dinguserzhenshiname"))&",您好:<br><br>"
mailbody=mailbody & "歡迎您注冊(cè)" & webname & "網(wǎng)上商城,我們將提供給您最好的服務(wù)!<br>"
mailbody=mailbody & "下面是您在" & webname & "網(wǎng)上商城的卡號(hào)和密碼:<br><br>"
mailbody=mailbody & ""&ii&""
mailbody=mailbody & "<br><br>"
mailbody=mailbody & "<center><font color=red>再次感謝您來" & webname & "網(wǎng)上商城!</font>"
mailbody=mailbody & "</TD></TR></TBODY></TABLE><br><hr width=95% size=1>"
mailbody=mailbody & "</body>"
mailbody=mailbody & "</html>"
Set JMail=Server.CreateObject("JMail.Message")
JMail.Charset="gb2312"
JMail.ContentType = "text/html"
jmail.from = mailsend
jmail.silent = true
jmail.Logging = true
jmail.FromName = mailname
jmail.mailserverusername = mailusername
jmail.mailserverpassword = mailuserpass
jmail.AddRecipient trim(session("dinguseremail"))
jmail.body=mailbody
JMail.Subject=topic
if not jmail.Send ( mailaddress ) then
SendMail=""
else
SendMail="OK"
end if
if SendMail="OK" then
sendmsg="<p>· 您的卡號(hào)和密碼已經(jīng)發(fā)往您的郵箱,請(qǐng)注意查收!</p>"
else
sendmsg="<p>· 系統(tǒng)出錯(cuò),卡號(hào)和密碼未能發(fā)送到您的郵箱!</p>"
end if
%>
<%else%>
在線支付失敗!
<%end if%>
</p>
</td>
</tr>
</table>
<p> </p>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--#include file="service.asp"-->
<!--#include file="bjxfoot.asp"-->
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -