asp 一些支付接口

2019-01-13 07:07:04王振洲

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    兴业银行