⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ordercheck.asp

📁 大型豪华网络游戏交易平台!!有喜欢的就的就快哦~~~~~~
💻 ASP
字号:
<!--#include file="mysqlfire.asp"-->
<!--#include file="ordersec.asp"-->
<!--#include file="orderconn.asp"-->
<!--#include file="../paysettings.asp"-->
<!--#include file="../md5char.asp"-->
<%
'#############################################################
'#              贺喜支付平台支付接口定单管理系统
'#                            v2.3
'#                   http://www.168reg.cn
'#
'#  版权所有: 株洲市和谐网络科技发展有限公司
'#
'#  主页地址: http://www.168reg.cn
'#  技术支持: support@168reg.cn
'#  技 术 QQ: 359465724
'#  技术QQ群:8246422,7048987
'#
'#############################################################
'# ·郑重声明:
'# ·此定单系统仅提供简易版定单管理功能,其他功能,请自行开发。
'# ·由于用户原因,可能导致定单数据丢失,请经常登录管理区查看定单。
'# ·此程序不得随意公开发布、销售或进行其他非法转让。
'# ·如对此程序有任何疑问,请在管理区留言。
'#############################################################
'贺喜支付平台单个商户订单查询
billno=request("billno")
md5str=Ucase(trim(md5(reg_userid&billno&paykey)))

'单个商户订单查询网关
CheckURL	= "http://pay.168reg.cn/check-order.do?reg_userid=" & reg_userid & "&billno=" & billno & "&md5str=" & md5str

Function bytes2BSTR(vIn)
strReturn = ""
For i = 1 To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,i,1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,i+1,1))
strReturn = strReturn & Chr (CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
i = i + 1
End If
Next
bytes2BSTR = strReturn
End Function

set oSend=createobject("Microsoft.XMLHTTP")
SourceCode = oSend.open ("GET",CheckURL,false)
oSend.send()

ResponseTxt = bytes2BSTR(oSend.responseBody)
set oSend=nothing

if ResponseTxt="" then%>
	<script language=vbscript>
	  MsgBox "错误:订单自动查询失败!"
	  location.href = "javascript:history.go(-1)"
	</script>
	<%Response.end
end if
if ResponseTxt="||0" then%>
	<script language=vbscript>
	  MsgBox "错误:该定单支付失败或未支付!"
	  location.href = "javascript:history.go(-1)"
	</script>
	<%Response.end
end if
if instr(ResponseTxt, "||")>0 then
	info=Split(ResponseTxt,"||")
	arraycount=UBound(info)
	if arraycount>6 then
		if info(1)="1" then
			set rs=server.createobject("adodb.recordset")
			'检测定单号是否已存在于数据库中,可根据自己的数据库修改或使用我们提供的示例数据库。
			sql="SELECT * FROM myorder where billno='" & billno & "'"
			rs.open sql,conn,1,3
			if not rs.eof then
				if rs("userpaid") then
					'定单付款状态已更改,不再修改付款状态,直接显示支付结果。
					%>
					<script language=vbscript>
					  MsgBox "错误:该定单已经是已付款状态!"
					  location.href = "javascript:history.go(-1)"
					</script>
					<%Response.end
				else
					rs("orderid")=info(4)
					rs("price")=info(2)
					if rs("payvia")=info(3) then
						rs("payvia")=info(6)
					elseif rs("payvia")<>info(6) then
						rs("payvia")="提交:" & rs("payvia") & ",返回:" & info(3)
					end if
					rs("pstring")="支付成功"
					rs("userpaid")=true
					rs("paydate")=info(5)
					rs.update
				end if
			else
				'未找到定单的处理。
				%>
				<script language=vbscript>
				  MsgBox "错误:定单数据库中未找到该定单!"
				  location.href = "javascript:history.go(-1)"
				</script>
				<%Response.end
			end if
			rs.close
			set rs=nothing
			CloseDatabase
		end if
	else
		if info(1)="0" or info(1)<0 or info(1)="" then%>
		<script language=vbscript>
		  MsgBox "错误:该定单支付失败或未支付!"
		  location.href = "javascript:history.go(-1)"
		</script>
		<%Response.end
		end if
	end if
else
	if ResponseTxt<>"||1" then%>
		<script language=vbscript>
		  MsgBox "错误:该定单支付失败或未支付!"
		  location.href = "javascript:history.go(-1)"
		</script>
		<%Response.end
	end if
end if
if session("curfile")="" then
	response.redirect "vieworder.asp"
else
	response.redirect session("curfile")
end if
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -