转一个支付宝接口的ASP代码 支付宝接口(应用实例)2008-08-22 16:33支付宝接口的ASP代码

转一个支付宝接口的ASP代码 支付宝接口(应用实例)2008-08-22 16:33支付宝接口的ASP代码 <% Dim clsAlipay Dim strNotify, strTradeURL, strShoppingBagID Dim intPrice Dim dtmNow Set clsAlipay = New Cls_Alipay intPrice = 0.01 dtmNow = Now() '交易号 Randomize 'RND strShoppingBagID = Year(dtmNow) & Right("0" & Month(dtmNow), 2) & Right("0" & Day(dtmNow), 2) & Right("0" & Hour(dtmNow), 2) & Right("0" & Minute(dtmNow), 2) & Right("0" & Second(dtmNow), 2) & Right("000000" & Rnd * 1000000, 6) Set clsAlipay = New Cls_Alipay '支付宝交易类 ' 生成支付宝交易地址 clsAlipay.key = "" '安全校验码 clsAlipay.Input.partner = "" '合作伙伴ID clsAlipay.Input.service = "create_direct_pay_by_user" '接口名称.即时到帐交易 clsAlipay.Input.payment_type = "1" '支付类型 clsAlipay.Input.show_url = "" '商品展示网址 'clsAlipay.Input.notify_url = strSiteDomain & "/personal/alipay_notify.asp" '通知URL clsAlipay.Input.notify_url = "http://project.sotong.cn/personal/alipay_notify.asp" clsAlipay.Input.return_url = "" '返回URL clsAlipay.Input.input_charset = "utf-8" 'gbk/utf-8 clsAlipay.Input.subject = "用户充值" clsAlipay.Input.body = "" clsAlipay.Input.discount = "0" clsAlipay.Input.out_trade_no = strShoppingBagID clsAlipay.Input.total_fee = intPrice clsAlipay.Input.seller_email = "" strTradeURL = clsAlipay.TradeURL If clsAlipay.ErrCodes > 0 Then Response.write clsAlipay.Description '如果出错显示错误提示 Response.Write " go alipay.com" Response.Write "
" ' 支付宝通知验证 clsAlipay.key = "" clsAlipay.Notify.partner = "" clsAlipay.Notify.RequestPay() 'clsAlipay.Notify_Verify 通知验证 'clsAlipay.Sign_Verify sign对比验证 If clsAlipay.Notify_Verify and clsAlipay.Sign_Verify Then strNotify = "success" ' Update Database '实物交易根据 clsAlipay.Notify.trade_status 来更新自己的数据 'Response.Write clsAlipay.Notify.trade_status Else strNotify = "fail" End If ' Return Notify Response.Write strNotify ' ShutDown Set clsAlipay = Nothing Set ls = Nothing %>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值