正在加载中...

关闭
请选择需要拨打的号码

信息详页

返回
asp微信支付接口,如何获取post过来的xml
asp微信支付接口,如何获取post过来的xml,要取得openid值:
Set xmlMap = Server.CreateObject("Scripting.Dictionary")

Dim varCount,varReq,xmldom
varCount = Request.TotalBytes
varReq = Request.BinaryRead(varCount)
Dim content
Dim OpenIdStr
If varCount > 0 And Request.ServerVariables("REQUEST_METHOD") = "POST" Then

Set xmlDoc = Server.CreateObject("MSXML2.DOMDocument")
xmlDoc.load varReq
Set obj =  xmlDoc.selectSingleNode("xml")
For Each node in obj.childnodes
xmlMap.Add node.nodename, node.text
If node.nodename = "OpenId" Then
OpenIdStr = node.text
End If 
Next

End If