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%>">









