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

📄 send.asp

📁 易和阳光购物商城 v1.3 | 功能简介 增加了防注入文件
💻 ASP
字号:
<!-- #include file="asp_md5.asp" -->
<%
	Dim merchantId
	Dim keyValue
	
    merchantId  = request("cid")		'''商户编号
    keyValue  = request("mykey")		'''商户密钥
    orderid = request("orderid")		'''订单编号
    amount = request("totalmoney")		'''订单金额
%>
<html>
<title>财付通支付</title>
<meta http-equiv="Cache-Control" content="no-cache"/> 
<body onLoad="javascript:document.frm.submit()">
	<% Response.Charset="GB2312" %>
<%
	' 获取服务器日期,格式YYYYMMDD
	Function CFTGetServerDate 
		Dim strTmp, iYear,iMonth,iDate 
		iYear = Year(Date) 
		iMonth = Month(Date) 
		iDate = Day(Date) 

		strTmp = CStr(iYear)
		If iMonth < 10 Then 
			strTmp = strTmp & "0" & Cstr(iMonth)
		Else 
			strTmp = strTmp & Cstr(iMonth)
		End If 
		If iDate < 10 Then 
			strTmp = strTmp & "0" & Cstr(iDate) 
		Else 
			strTmp = strTmp & Cstr(iDate) 
		End If 
		CFTGetServerDate = strTmp 
	End Function

	Dim md5_sign

	spid		= merchantId  		' 这里替换为您的实际商户号
	sp_key	= keyValue	' sp_key是32位商户密钥, 请替换为您的实际密钥

	' 下面是请求参数
	cmdno		= "1"				' 财付通支付为"1" (当前只支持 cmdno=1)	
	bill_date	= CFTGetServerDate	' 交易日期 (yyyymmdd)	
	bank_type	= "0"				' 银行类型:	0		财付通
									'			1001	招商银行   
									'			1002	中国工商银行  
									'			1003	中国建设银行  
									'			1004	上海浦东发展银行   
									'			1005	中国农业银行  
									'			1006	中国民生银行  
									'			1008	深圳发展银行   
									'			1009	兴业银行   

	desc		= ""		' 商品名称
	purchaser_id = ""				' 用户财付通帐号,如果没有可以置空
	bargainor_id = spid				' 商户号
	sp_billno	 = orderid		' 商户生成的订单号(最多32位)	

	' 重要:
	' 交易单号(28位): 商户号(10位) + 日期(8位) + 流水号(10位), 必须按此格式生成, 且不能重复
	' 如果sp_billno超过10位, 则截取其中的流水号部分加到transaction_id后部(不足10位左补0)
	' 如果sp_billno不足10位, 则左补0, 加到transaction_id后部
	transaction_id = spid & bill_date & "0000" & right(sp_billno,6)

	total_fee	 = amount*100				' 总金额, 分为单位
	fee_type	 = "1"				' 货币类型: 1 – RMB(人民币) 2 - USD(美元) 3 - HKD(港币)
	return_url	 = "" ' 财付通回调页面地址, (最长255个字符)
	attach		 = ""	' 商户私有数据, 请求回调页面时原样返回

	' 生成MD5签名    
	sign_text = "cmdno=" & cmdno & "&date=" & bill_date & "&bargainor_id=" & bargainor_id &_
        "&transaction_id=" & transaction_id & "&sp_billno=" & sp_billno &_
        "&total_fee=" & total_fee & "&fee_type=" & fee_type & "&return_url=" & return_url &_
        "&attach=" & attach & "&key=" & sp_key

	md5_sign = UCase(ASP_MD5(sign_text))        ' 转换为大写  
%>

<form name="frm" action="https://www.tenpay.com/cgi-bin/v1.0/pay_gate.cgi">
<input type=hidden name="cmdno"				value="<%=cmdno%>">
<input type=hidden name="date"			    value="<%=bill_date%>">
<input type=hidden name="bank_type"			value="<%=bank_type%>">
<input type=hidden name="desc"				value="<%=desc%>">
<input type=hidden name="purchaser_id"		value="<%=purchaser_id%>">
<input type=hidden name="bargainor_id"		value="<%=bargainor_id%>">
<input type=hidden name="transaction_id"	value="<%=transaction_id%>">
<input type=hidden name="sp_billno"			value="<%=sp_billno%>">
<input type=hidden name="total_fee"			value="<%=total_fee%>">
<input type=hidden name="fee_type"			value="<%=fee_type%>">
<input type=hidden name="return_url"		value="<%=return_url%>">
<input type=hidden name="attach"			value="<%=attach%>">
<input type=hidden name="sign"				value="<%=md5_sign%>">

</form>
</body>

</html>

⌨️ 快捷键说明

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