send.asp
<!--#include file="md5.asp"-->
<%
'''''''''
' @Description: 快钱网关接口范例
' @Copyright (c) 上海快钱信息服务有限公司
' @version 2.0
'''''''''
merchant_id = "879905060103109788" '''商户编号
merchant_key = "99billKeyForTest" '''商户密钥
orderid = "0226001" '''订单编号
amount = "0.02" '''订单金额
curr = "1" '''货币类型,1为人民币
isSupportDES = "2" '''是否安全校验,2为必校验,推荐
merchant_url = "" '''支付结果返回地址
pname = "" '''支付人姓名
commodity_info = "" '''商品信息
merchant_param = "" '''商户私有参数
pemail="" '''传递email到快钱网关页面
pid="" '''代理/合作伙伴商户编号
'''生成加密串,注意顺序
ScrtStr="merchant_id=" & merchant_id & "&orderid=" & orderid & "&amount=" & amount & "&merchant_url=" & merchant_url & "&merchant_key=" & merchant_key
mac=ucase(md5(ScrtStr))
%>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en" >
<html>
<head>
<title>快钱99bill</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312" >
</head>
<BODY>
<div align="center">
<table width="259" border="0" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC" >
<tr bgcolor="#FFFFFF">
<td width="68">订单编号:</td>
<td width="182"><%=orderid%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>订单金额:</td>
<td><%=amount%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>支付人:</td>
<td><%=pname%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>商品名称:</td>
<td><%=commodity_info%></td>
</tr>
<tr>
<td></td><td></td>
</tr>
</table>
</div>
<div align="center" style="font-size=12px;font-weight: bold;color=red;">
<form name="frm" method="post" action="https://www.99bill.com/webapp/receiveMerchantInfoAction.do">
<input name="merchant_id" type="hidden" value="<%=merchant_id%>">
<input name="orderid" type="hidden" value="<%=orderid%>">
<input name="amount" type="hidden" value="<%=amount%>">
<input name="currency" type="hidden" value="<%=curr%>">
<input name="isSupportDES" type="hidden" value="<%=isSupportDES%>">
<input name="mac" type="hidden" value="<%=mac%>">
<input name="merchant_url" type="hidden" value="<%=merchant_url%>">
<input name="pname" type="hidden" value="<%=pname%>">
<input name="commodity_info" type="hidden" value="<%=commodity_info%>">
<input name="merchant_param" type="hidden" value="<%=merchant_param%>">
<input name="pemail" type="hidden" value="<%=pemail%>">
<input name="pid" type="hidden" value="<%=pid%>">
<input name="payby99bill" type="image" src="../about99bill/button/button_99bill_tj1.gif" value="快钱支付">
</form>
可以支持银行卡、快钱账户、银行或邮局汇款方式支付.还可参加积分换礼活动!<a href="http://www.99bill.com/index/hd/99bill_hd2.html" target="_blank" class="font-size: 12px;">>>>详情点击</a>
</div>
</BODY>
</HTML>
receive.asp
<!--#include file="md5.asp"-->
<%
'''''''''
' @Description: 快钱网关接口范例
' @Copyright (c) 上海快钱信息服务有限公司
' @version 2.0
'''''''''
merchant_key ="99billKeyForTest" '''商户密钥
merchant_id = request("merchant_id") '''获取商户编号
orderid = request("orderid") '''获取订单编号
amount = request("amount") '''获取订单金额
dealdate = request("date") '''获取交易日期
succeed = request("succeed") '''获取交易结果,Y成功,N失败
mac = request("mac") '''获取安全加密串
merchant_param = request("merchant_param") '''获取商户私有参数
couponid = request("couponid") '''获取优惠券编码
couponvalue = request("couponvalue") '''获取优惠券面额
'''生成加密串,注意顺序
ScrtStr = "merchant_id=" & merchant_id & "&orderid=" & orderid & "&amount=" & amount & "&date=" & dealdate & "&succeed=" & succeed & "&merchant_key=" & merchant_key
mymac=md5(ScrtStr)
v_result="失败"
if ucase(mac)=ucase(mymac) then
if succeed="Y" then '''支付成功
v_result="成功"
'''
'''#商户网站逻辑处理#
'''
else '''支付失败
end if
else '''签名错误
end if
%>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en" >
<html>
<head>
<title>快钱99bill</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
</head>
<body>
<div align="center">
<table width="259" border="0" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC" >
<tr bgcolor="#FFFFFF">
<td width="68">订单编号:</td>
<td width="182"><%=orderid%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>订单金额:</td>
<td><%=amount%></td>
</tr>
<tr bgcolor="#FFFFFF">
<td>支付结果:</td>
<td><%=v_result%></td>
</tr>
</table>
</div>
</body>
</html>