📄 receive.asp
字号:
<!--#include file="../pay_function.asp"-->
<!--#include file="168settings.asp"-->
<!-- #include file="168char.asp" -->
<%
'on error Resume Next
vip=Request.ServerVariables("Remote_Addr") '提交者IP地址
v_orderid=Request.Form("v_orderid") '168注册中心反馈的定单号
v_orderdate=Request.Form("v_orderdate") '定单成交时间
v_price=Request.Form("v_price") '定单成交价格
v_province=Request.Form("v_province") '用户提交时选择的省份
v_city=Request.Form("v_city") '用户提交时选择的城市(地区)
'########################################################################
'参数排列:0用户,1级别号,2级别名,3金额,4点数/有效期
'########################################################################
v_custom1=Split(Request.Form("v_custom1"),"|") '自定义字段1
v_custom2=Request.Form("v_custom2") '自定义字段2
v_md5=Request.Form("v_md5") '返回的加密字符串
v_pstatus=Request.Form("v_pstatus") '定单成功反馈的字符串,有1和0两种情况。主要用于验证是否属正常反馈。
if v_pstatus="1" then
if v_orderid="" or v_orderdate="" or v_price="" or v_md5="" then%>
<script language=vbscript>
MsgBox "非法反馈:反馈的数据不正确!"
location.href = "<%=myhomepage%>"
</script>
<%end if
'以下程序验证返回的加密字符串是否正确
encrypt_string=Ucase(trim(md5(v_orderid&v_price®_userid®_key)))
if v_md5<>encrypt_string then%>
<script language=vbscript>
MsgBox "致命错误:返回的加密字符串不正确,您是非法提交!"
location.href = "<%=myhomepage%>"
</script>
<%Response.end
end if
'验证返回的加密字符串是否正确程序结束
'以下程序防止用户是否多次刷新成功页面,最好的方法是您做成从自己的数据库中检测v_orderid定单号是否已成交,如果已成交,就不显示页面。
if session("reg168_orderid")<>"" then
if session("reg168_orderid")=v_orderid then%>
<script language=vbscript>
MsgBox "错误:同一定单成交页面不允许多次刷新或提交!"
location.href = "<%=myhomepage%>"
</script>
<%Response.end
else
session("reg168_orderid")=v_orderid
end if
else
session("reg168_orderid")=v_orderid
end if
'为防止用户多次刷新成功页面,使缓存的页面立即过期
Response.Expires=0
'########################################################################
' v_custom1参数排列:0用户,1级别号,2级别名,3金额,4点数/有效期
'########################################################################
if session("username")<>"" then
r_name = session("username")
else
r_name = v_custom1(0)
end if
if v_custom1(1)>1 then
'/////////////////////////////////////////////////////////////
' 用户包月升级函数:目标用户名,级别,金额,有效期/月,支付用户
'/////////////////////////////////////////////////////////////
call update_user(v_custom1(0),v_custom1(1),v_price,v_custom1(4),r_name)
else
'/////////////////////////////////////////////////////////////
' 用户加点数函数:目标用户名,级别,金额,加入点数,支付用户
'//////////////////////////////////////////////////////////////
call update_user_ds(v_custom1(0),v_custom1(1),v_price,v_price*vip_money(1),r_name)
end if
else
Response.write "支付失败"
end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -