📄 example.asp
字号:
<%
'/***************************************************************************************************************
'* FileName: Example.asp
'* Description: 本Asp文件为Asp网店集成支付宝接口的示例代码,网店开发者只需要将myAlipay.asp、MD5.asp两个文件放到同一个目录下,并include到相应的整合Asp文件中即可。如果您在集成过程中有任何疑问,请在“支付宝开发者论坛”-“网店集成支付宝有偿技术支持区”版块发帖提问或直接在论坛发短消息给我,我每天都会来论坛处理相关的问题;当然,如果您非常着急,您也可以直接上MSN、QQ、wangwang、或手机Call我!@^@商品名称goodsTitle为中文的问题,根据网友SHOPEX提供的算法已经得到解决,特此表示感谢!
'* Copyright: Copyright (c) 2005/7/25
'* Company: 淘宝网支付宝开发者论坛(http://dev.alipay.com)、易得网(http://www.ediom.net)
'* Author: yeaome(小叶/叶老四)
'* Version: Ver 2.0.0
'* Contact_Me: wangwang:yeaome ; QQ:38355624 ; MSN:yeaome@msn.com ; Mobile:13923706355/0755-84102932
'****************************************************************************************************************/
%>
<!--#include file="./myAlipay.asp"-->
<%
Dim goodsBid,ordinaryFee,expressFee,sellerEmail,goodsTitle,securityCode,Cmd,Subject,Body
Dim myAlipayObj,ResponseTxt1,ResponseTxt2,ResponseTxt3
'六个必要参数,您可以设置成表单或链接提交表单/请求链接的方式
goodsBid = "32.00" '商品价格
ordinaryFee = "12.00" '平邮费用
expressFee = "20.00" '快递费用
sellerEmail = "merchanttool@alipay.com" '您的支付宝认证Email,必须通过支付宝认证才可以
goodsTitle = "ED20050725001" '订单编号
securityCode = "wnqrsxq4n91x7ny637vdgtuutkt5n65h" '安全校验码,在支付宝网站“商家工具”那里可以获得
Cmd = "0001" '命令编号
Subject = "魔戒" '商品名称
Body = "欲寻指环王系列精彩周边,请到易得网(www.ediom.net)" '商品描述
'创建一个myAlipay实例,并初始化myAlipay_Initialize()
Set myAlipayObj = New myAlipay
myAlipayObj.myAlipay_Initialize()
'ResponseTxt1为请求i_link处理链接后生成的支付链接
ResponseTxt1 = myAlipayObj.getTradeButtonURL(goodsBid,ordinaryFee,expressFee,sellerEmail,goodsTitle,securityCode)
'ResponseTxt2为采用MD5等方法自动组合生成的支付链接,支持商品中文名称
ResponseTxt2 = myAlipayObj.generateTradeButtonURL(goodsBid,ordinaryFee,expressFee,sellerEmail,goodsTitle,securityCode)
'ResponseTxt3为采用MD5等方法自动组合生成的payto支付链接,支持商品中文名称
ResponseTxt3 = myAlipayObj.generatePaytoURL(goodsBid,ordinaryFee,expressFee,sellerEmail,goodsTitle,securityCode,Cmd,Subject,Body)
'Response.Write "ResponseTxt1 = " & ResponseTxt1
'Response.Write "<br>--------------------------------------------<br>"
'Response.Write "ResponseTxt2 = " & ResponseTxt2
'Response.Write "<br>--------------------------------------------<br>"
'Response.Write "ResponseTxt3 = " & ResponseTxt3
%>
<a href="<%=ResponseTxt3%>"><img src="../image/alibtn2.gif" border="0"></a>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -