ASP微信支付v4.0版本,最新的asp微信公众号支付源码,不需要安装证书,只要一个文件用到.net环境就可以用
<%
SET Wx = New WxAPI
If Session("openid")="" Then
Code = Trim(Request.QueryString("code"))
If Code = "" Then
wx.get_redirect_uri = "http://"&request.ServerVariables("HTTP_HOST")&request.ServerVariables("URL")&"?"&request.QueryString
Response.Redirect(Wx.GetAuthorization_Code)
Else
Call Wx.GetAccess_Token(Code)
End If
End If
Set Wx=Nothing
set wxpay = New WxPayApi
Dim body,out_trade_no,attach,total_fee,Arr,sUrl
body = "微信支付测试(WxPay)"
out_trade_no = wxpay.GetDateTime
attach = "呵呵目于网络"'商户自定义数据包.
total_fee = "0.01"
wxpay.setParameter "openid",Session("openid")'"oiQ6Bs4Vo0OWAAiHxVSbry7z6yzE"
wxpay.setParameter "body",body
wxpay.setParameter "out_trade_no",out_trade_no
wxpay.setParameter "attach",attach
wxpay.setParameter "total_fee",(total_fee)*100
wxpay.setParameter "trade_type","JSAPI"
wxpay.setParameter "spbill_create_ip","127.0.0.1"
wxpay.setParameter "notify_url",NOTIFY_URL
wxpay.setParameter "device_info","WEB"
jsApiParameters = wxpay.get_Parameters
EditAddressParameters = wxpay.GetEditAddressParameters
'xml= wxpay.Get_Return_Xml()
'wxpay.Die jsApiParameters
set wxpay = Nothing
%>
订单号:<%= out\_trade\_no %>
商品名称:<%= body %>
付款金额:<%= total\_fee %>元
=============================================
互相学习电话微信:18611436777(加微信注明事由)