www.gusucode.com > 乘风网站推广系统 3.99 (acc)码程序 > OnlinePay_Receive_2.asp
<% '乘风网站推广系统 Access版 '作者QQ:178575 '作者EMail:yliangcf@163.com '作者网站:http://www.qqcf.com '详细简介:http://www.qqcf.com/?action=list&list=cfwztg '上面有程序在线演示,安装演示,使用疑难解答,最新版本下载等内容 '因为这些内容可能时常更新,就没有放在程序里,请自己上网站查看 %> <!--#Include File="Conn.asp"--> <!--#Include File="CF_MyFunction.asp"--> <!--#Include File="CF_Md5.asp"--> <% '**************************************** ' MD5密钥要跟订单提交页相同,如Send.asp里的 key = "test" ,修改""号内 test 为您的密钥 ' 如果您还没有设置MD5密钥请登陆我们为您提供商户后台,地址:https://merchant3.chinabank.com.cn/ key = GetMySet("CFWztgAdminSet","AdminSet","OnlinePayKey_2") ' 登陆后在上面的导航栏里可能找到“资料管理”,在资料管理的二级导航栏里有“MD5密钥设置” ' 建议您设置一个16位以上的密钥或更高,密钥最多64位,但设置16位已经足够了 '**************************************** ' 取得返回参数值 v_oid=request("v_oid") ' 商户发送的v_oid定单编号 v_pmode=request("v_pmode") ' 支付方式(字符串) v_pstatus=CInt(request("v_pstatus")) ' 支付状态 20(支付成功);30(支付失败) If v_pstatus="20" Then v_result="成功" Elseif v_pstatus="30" Then v_result="失败" End If v_pstring=request("v_pstring") ' 支付结果信息 支付完成(当v_pstatus=20时);失败原因(当v_pstatus=30时); v_amount=request("v_amount") ' 订单实际支付金额 v_moneytype=request("v_moneytype") ' 订单实际支付币种 remark1=request("remark1") ' 备注字段1 remark2=request("remark2") ' 备注字段2 v_md5str=request("v_md5str") ' 网银在线拼凑的Md5校验串 OrderCode = v_oid'取得发给支付系统的自己定义的订单号 if request("v_md5str")="" then response.Write("v_md5str:空值") response.end end if 'md5校验 text = v_oid&v_pstatus&v_amount&v_moneytype&key md5text = Ucase(trim(md5(text,2))) '商户拼凑的Md5校验串 if md5text<>v_md5str then ' 网银在线拼凑的Md5校验串 与 商户拼凑的Md5校验串 进行对比 '对比失败表示信息非网银在线返回的信息 response.write("MD5 error") else '对比成功表示信息是网银在线返回的信息 if v_pstatus=20 then %> <!--#include file="OnlinePay_Ok.asp"--> <% Response.write "支付成功,请关闭本页" end if end if %>