账号通
    

账号  

密码  

1793

查看

3

回复
主题:快钱实是到帐,科汛不能返回定单,望高手解决,附代码 [收藏主题] 转到:  
kh2000 当前离线

217

主题

1

广播

0

粉丝
添加关注
级别:二年级

用户积分:2380 分
登录次数:297 次
注册时间:2009/9/19
最后登录:2022/4/25
kh2000 发表于:2010/6/10 14:27:00   | 显示全部帖子 查看该作者主题 楼主 
科汛在线网校系统

快钱实是到帐,科汛不能返回定单,望高手解决,附代码

 

'快钱支付
Sub billback()
Dim md5string
Dim merchantAcctId, key, version, language, signType, payType, bankId, orderId, orderTime, orderAmount, dealId, bankDealId, dealTime, payAmount
Dim fee, ext1, ext2, payResult, errCode, signMsg, merchantSignMsgVal

merchantAcctId = Trim(request("merchantAcctId")) '获取人民币网关账户号
key = MD5Key '
设置人民币网关密钥
version = Trim(request("version")) '
获取网关版本
language = Trim(request("language")) '
获取语言种类,1代表中文;2代表英文
signType = Trim(request("signType")) '
签名类型,1代表MD5签名
payType = Trim(request("payType")) '
获取支付方式,00:组合支付,10:银行卡支付,11:电话银行支付,12:快钱账户支付,13:线下支付,14B2B支付
bankId = Trim(request("bankId")) '
获取银行代码
orderId = Trim(request("orderId")) '
获取商户订单号
orderTime = Trim(request("orderTime")) '
获取订单提交时间
orderAmount = Trim(request("orderAmount")) '
获取原始订单金额
dealId = Trim(request("dealId")) '
获取快钱交易号
bankDealId = Trim(request("bankDealId")) '
获取银行交易号
dealTime = Trim(request("dealTime")) '
获取在快钱交易时间
payAmount = Trim(request("payAmount")) '
获取实际支付金额,单位为分
fee = Trim(request("fee")) '
获取交易手续费
ext1 = Trim(request("ext1")) '
获取扩展字段1
ext2 = Trim(request("ext2")) '
获取扩展字段2

'获取处理结果
''10
代表 成功11代表 失败
''00
代表 下订单成功(仅对电话银行支付订单返回);01代表 下订单失败(仅对电话银行支付订单返回)
payResult = Trim(request("payResult"))
errCode = Trim(request("errCode")) '
获取错误代码,详细见文档错误代码列表
signMsg = Trim(request("signMsg")) '
获取加密签名串

'生成加密串。必须保持如下顺序。
merchantSignMsgVal = appendParam(merchantSignMsgVal, "merchantAcctId", merchantAcctId)
merchantSignMsgVal = appendParam(merchantSignMsgVal, "version", version)
merchantSignMsgVal = appendParam(merchantSignMsgVal, "language", language)
merchantSignMsgVal = appendParam(merchantSignMsgVal, "signType", signType)
merchantSignMsgVal = appendParam(merchantSignMsgVal, "payType", payType)
merchantSignMsgVal = appendParam(merchantSignMsgVal, "bankId", bankId)
merchantSignMsgVal = appendParam(merchantSignMsgVal, "orderId", orderId)
merchantSignMsgVal = appendParam(merchantSignMsgVal, "orderTime", orderTime)
merchantSignMsgVal = appendParam(merchantSignMsgVal, "orderAmount", orderAmount)
merchantSignMsgVal = appendParam(merchantSignMsgVal, "dealId", dealId)
merchantSignMsgVal = appendParam(merchantSignMsgVal, "bankDealId", bankDealId)
merchantSignMsgVal = appendParam(merchantSignMsgVal, "dealTime", dealTime)
merchantSignMsgVal = appendParam(merchantSignMsgVal, "payAmount", payAmount)
merchantSignMsgVal = appendParam(merchantSignMsgVal, "fee", fee)
merchantSignMsgVal = appendParam(merchantSignMsgVal, "ext1", ext1)
merchantSignMsgVal = appendParam(merchantSignMsgVal, "ext2", ext2)
merchantSignMsgVal = appendParam(merchantSignMsgVal, "payResult", payResult)
merchantSignMsgVal = appendParam(merchantSignMsgVal, "errCode", errCode)
merchantSignMsgVal = appendParam(merchantSignMsgVal, "key", key)

md5string = MD5(merchantSignMsgVal, 32)

Dim rtnOk, rtnUrl
rtnOk = 0
rtnUrl = "http://www.51shiping.com/user/show.asp"

''首先进行签名字符串验证
If UCase(signMsg) = UCase(md5string) Then
    ''
接着进行支付结果判断
    Select Case payResult
          Case "10"   '
支付成功,更新订单
            rtnOk = 1
   Call UpdateOrder(orderAmount / 100,"
在线充值,订单号为:" & orderId,orderId,"")
   Call ShowResult("
恭喜你!在线支付成功!")
         Case Else
            rtnOk = 1
    End Select
Else
    rtnOk = 1
End If
%>
<result><%=rtnOk %></result><redirecturl><%=rtnUrl %></redirecturl>
<%
End Sub

Function appendParam(returnStr, paramId, paramValue)
    If returnStr <> "" Then
        If paramValue <> "" Then
           returnStr=returnStr&"&"&paramId&"="&paramValue
        End If
    Else
        If paramValue <> "" Then
           returnStr=paramId&"="&paramValue
        End If
    End If
    appendParam = returnStr
End Function

 

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
kh2000 当前离线

217

主题

1

广播

0

粉丝
添加关注
级别:二年级

用户积分:2380 分
登录次数:297 次
注册时间:2009/9/19
最后登录:2022/4/25
kh2000 发表于:2010/6/10 14:34:00   | 显示全部帖子 查看该作者主题 沙发 
一生有你,我太爱你了
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
<上一主题 | 下一主题 >
Powered By KesionCMS Version X1
厦门科汛软件有限公司 © 2006-2016 页面执行0.07813秒 powered by KesionCMS 9.0