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

📄 adminpay.asp

📁 一个不错的个人商务网站的源码
💻 ASP
字号:
<%dim nowplace
nowplace="pay"
dim dbpath
dbpath="../"
%>
<!--#include file="chk.asp"-->
<!--#include file="../db_conn.asp" -->
<!--#include file="../comm/my_request.asp" -->
<!--#include file="../comm/my_lib.asp" -->
<!--#include file="../comm/base64.asp"-->
<%
flag=my_request("flag",0)
if flag="save" then
call save()
elseif flag="save2" then
call save2()
elseif flag="" then
else
response.write "系统错误数据,未被保留"
end if
sql="select * from pay_online where id=1"
set rs=conn.execute (sql)
ipayno2=rs("shbh")
ipaykey2=rs("pay_key")
payflag=rs("payflag")
rs.close
set rs=nothing
ipayno=replace(strAnsi2Unicode(Base64decode(strUnicode2Ansi(ipayno2))),chr(13)&chr(10),"<br>")
ipaykey=replace(strAnsi2Unicode(Base64decode(strUnicode2Ansi(ipaykey2))),chr(13)&chr(10),"<br>")

sql2="select * from pay_online where id=2"
set rs2=conn.execute (sql2)
ipayno4=rs2("shbh")
ipaykey4=rs2("pay_key")
rs2.close
set rs2=nothing
ipayno21=replace(strAnsi2Unicode(Base64decode(strUnicode2Ansi(ipayno4))),chr(13)&chr(10),"<br>")
ipaykey21=replace(strAnsi2Unicode(Base64decode(strUnicode2Ansi(ipaykey4))),chr(13)&chr(10),"<br>")
%>
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网上支付接口设置</title>
<link href=AdminStyle.css rel=stylesheet type=text/css>
</head>

<body>
<table border="0" width="100%" id="table1" cellpadding="4" style="border:1px solid #183789; border-collapse: collapse; padding-left:4px; padding-right:4px; padding-top:1px; padding-bottom:1px" cellspacing="1">
<form action=AdminPay.asp method=post>
	<tr>
		<td width="100%" colspan="2" background="Image/admin_bg_1.gif" height="25">
		<font color="#FFFFFF"><b>购物车支付接口设置:</b></font></td>
	</tr>
	<tr>
		<td width="140" bgcolor="#F9F9F9">网上支付服务提供商:</td>
		<td width="825" bgcolor="#F9F9F9"><select size="1" name="payflag">
			<option value="1" <%if payflag=1 then response.write "selected"%>>支付宝</option>
			<option value="2" <%if payflag=2 then response.write "selected"%>>Ipay</option>
			<option value="3" <%if payflag=3 then response.write "selected"%>>网银在线</option>
			<option value="4" <%if payflag=4 then response.write "selected"%>>NPS</option>
			<option value="5">paypal国际支付</option>
			</select> <font color="#000080"><u>选择那项表示购物车结算的时候将采用此种方式结算</u></font></td>
	</tr>
	<tr>
		<td width="140" bgcolor="#F9F9F9">商家号:</td>
		<td width="825" bgcolor="#F9F9F9">
		<input type="text" name="ipayno" size="77" maxlength="100" value="<%=ipayno%>"></td>
	</tr>
	<tr>
		<td width="140" bgcolor="#F9F9F9">私钥:</td>
		<td width="825" bgcolor="#F9F9F9">
		<input type="text" name="ipaykey" size="77" maxlength="200" value="<%=ipaykey%>"><input type="hidden" name="flag" value="save"></td>
	</tr>
	<tr>
		<td width="140" bgcolor="#F9F9F9">在前台的支付图标:</td>
		<td width="825" bgcolor="#F9F9F9">
		<img border="0" src="../images/cart.gif" width="18" height="12"></td>
	</tr>
	<tr>
		<td width="140" bgcolor="#F9F9F9"> </td>
		<td width="825" bgcolor="#F9F9F9">
		<input type="submit" value="保存数据" name="B1"><br>
 <ul>
				<li>
				<p align="left">注意:商家号和商户私钥经过加密保存在数据库中,保证其安全性。</li>
				<li>
				<p align="left">此两项必须填写正确,否则在线交易会出错。</li>
				<li>
				<p align="left"><b><u><font color="#FF0000">如果采用支付宝支付,商家号请填写电子邮件地址。</font></u></b></li>
				<li>
				<p align="left">一定要保持数据的对应关系</li>
			</ul>
			</td>
	</tr></form>
</table>

<table border="0" width="100%" id="table3" cellspacing="0" cellpadding="0">
	<tr>
		<td> </td>
	</tr>
</table>

<table border="0" width="100%" id="table2" cellpadding="4" style="border:1px solid #183789; border-collapse: collapse; padding-left:4px; padding-right:4px; padding-top:1px; padding-bottom:1px" cellspacing="1">
<form action=AdminPay.asp method=post>
	<tr>
		<td width="100%" colspan="2" background="Image/admin_bg_1.gif" height="25">
		<font color="#FFFFFF"><b>支付宝设置(用于前台单个商品的直接购买):</b></font></td>
	</tr>
	<tr>
		<td width="135">网上支付服务提供商:</td>
		<td width="830"><select size="1" name="payflag0">
			<option value="1" <%if payflag=1 then response.write "selected"%>>支付宝</option>
			</select> <font color="#000080"> <u>此种方式只适应单直接结算方式</u></font></td>
	</tr>
	<tr>
		<td width="135">电子邮件地址:</td>
		<td width="830">
		<input type="text" name="email" size="77" maxlength="100" value="<%=ipayno21%>"></td>
	</tr>
	<tr>
		<td width="135">安全代码:</td>
		<td width="830">
		<input type="text" name="safecode" size="77" maxlength="200" value="<%=ipaykey21%>"><input type="hidden" name="flag" value="save2"></td>
	</tr>
	<tr>
		<td width="135">支付宝返回URL:</td>
		<td width="830">
		<%response.write "http://"&Request.ServerVariables ("SERVER_NAME")&"/alipaysbackok.asp"%> 
		<font color="#FF0000">请把此段文字拷贝到商家工具的URL返回地址。</font></td>
	</tr>
	<tr>
		<td width="135">在前台的支付图标:</td>
		<td width="830">
		<img border="0" src="../images/alipay_bwsx.gif" width="180" height="65"><br>
		<img border="0" src="../images/icon_alipay_small.gif" width="92" height="20"></td>
	</tr>
	<tr>
		<td width="135"> </td>
		<td width="830"><input type="submit" value="保存数据" name="B3"></td>
	</tr></form>
</table>

</body>

</html>
<%
sub save()
ipayno1=my_request("ipayno",0)
ipaykey1=my_request("ipaykey",0)
payflag=my_request("payflag",1)
if ipayno1="" or ipaykey1="" or payflag="" then
call wurl("数据保存失败","AdminPay.asp")
Response.end
else
ipayno=strAnsi2Unicode(Base64encode(strUnicode2Ansi(ipayno1)))
ipaykey=strAnsi2Unicode(Base64encode(strUnicode2Ansi(ipaykey1)))
sql="update pay_online set pay_key='"&ipaykey&"',shbh='"&ipayno&"',payflag="&payflag&" where id=1"
conn.execute (sql)
call wurl("数据保存成功","AdminPay.asp")
Response.end
end if
end sub

sub save2()
ipayno22=my_request("email",0)
ipaykey22=my_request("safecode",0)
if ipayno22="" or ipaykey22="" then
call wurl("数据保存失败","AdminPay.asp")
Response.end
else
ipayno=strAnsi2Unicode(Base64encode(strUnicode2Ansi(ipayno22)))
ipaykey=strAnsi2Unicode(Base64encode(strUnicode2Ansi(ipaykey22)))
sql="update pay_online set pay_key='"&ipaykey&"',shbh='"&ipayno&"' where id=2"
conn.execute (sql)
call wurl("数据保存成功","AdminPay.asp")
Response.end
end if
end sub
conn.close
set conn=nothing
%>

⌨️ 快捷键说明

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