asp 一些支付接口

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

    Set AlipayObj    = New creatAlipayItemURL
    itemUrl=AlipayObj.creatAlipayItemURL(t1,t4,t5,service,agent,partner,sign_type,subject,body,out_trade_no,price,discount,show_url,quantity,payment_type,logistics_type,logistics_fee,logistics_payment,logistics_type_1,logistics_fee_1,logistics_payment_1,seller_email,notify_url,return_url,key)

response.redirect itemUrl
response.end
%>


4.send.asp

<!--#include file="alipay_payto.asp"-->
<%

cid = request("cid")        '''商户编号
response.write cid&"<br>"
meykey = request("mykey")        '''商户密钥
response.write meykey&"<br>"

orderid = request("orderid")        '''订单编号
response.write orderid &"<br>"

totalmoeny = request("totalmoney")        '''订单金额
response.write totalmoeny&"<br>"

partnerid=request("other1")
response.write partnerid&"<br>"

other2=request("other2")
other3=request("other3")

'response.end
dim service,agent,partner,sign_type,subject,body,out_trade_no,price,discount,show_url,quantity,payment_type,logistics_type,logistics_fee,logistics_payment,logistics_type_1,logistics_fee_1,logistics_payment_1,seller_email,notify_url,return_url
dim t1,t4,t5,key
dim AlipayObj,itemUrl
    t1                =    "https://www.alipay.com/cooperate/gateway.do?"    '支付接口
    t4                =    "images/alipay_bwrx.gif"        '支付宝按钮图片
    t5                =    "推荐使用支付宝付款"                        '按钮悬停说明

    service = "trade_create_by_buyer"
    agent = partnerid '合作厂商id
    partner            =    partnerid        'partner合作伙伴ID(必须填)
    sign_type = "MD5"
    subject            =    "商品"        '商品名称
    body            =    ""        'body            商品描述
    out_trade_no = orderid '客户网站订单号,(现取系统时间,可改成网站自己的变量)
    price         =    totalmoeny                 'price商品单价            0.01~50000.00
discount = "0" '商品折扣
show_url = "" '商品展示地址(可以直接写网站首页网址)
quantity = "1" '商品数量
payment_type = "1" '支付类型,(1代表商品购买)
logistics_type = "EXPRESS" '物流种类(快递)
logistics_fee = other3 '物流费用
logistics_payment = other2 '物流费用承担(卖家付)
    logistics_type_1 = ""
logistics_fee_1 = ""
logistics_payment_1 = "" '物流费用承担(买家付)
seller_email = cid '(必须填)
key = meykey '(必须填)
notify_url= "" '服务器通知url(不使用,请不要注释或者删除此参数,不用传递给支付宝系统,Alipay_Notify.asp文件所在路经)
return_url= "" '服务器通知url(不使用,请不要注释或者删除此参数,不用传递给支付宝系统,Alipay_Notify.asp文件所在路经)