Foxtable(狐表)用户栏目专家坐堂 → post xml 数据该怎么写


  共有3182人关注过本帖树形打印复制链接

主题:post xml 数据该怎么写

帅哥,在线噢!
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:106134 积分:539787 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2018/2/11 11:07:00 [显示全部帖子]

请仔细核对官方的文档,很多必填的字段都没有

 回到顶部
帅哥,在线噢!
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:106134 积分:539787 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2018/2/11 12:20:00 [显示全部帖子]

请问看文档了么?https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_1

必填为是的都需要

 回到顶部
帅哥,在线噢!
有点蓝
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:106134 积分:539787 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2018/2/11 14:21:00 [显示全部帖子]

Dim hc As New HttpClient("https://api.mch.weixin.qq.com/pay/unifiedorder")
hc.Content = xml
MessageBox.Show(hc.getdata)
[此贴子已经被作者于2018/2/11 14:21:31编辑过]

 回到顶部
帅哥,在线噢!
有点蓝
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:106134 积分:539787 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2018/2/11 15:23:00 [显示全部帖子]

Dim StringA,stringSignTemp,sign As String
'stringA ="appid=wxa7154bc4751eddec&body=test&device_info=1000&mch_id=1488726912&nonce_str=ibuaiVcKdpRxkhJA"
' stringSignTemp = stringA + "&key=hahaqwertyuioasdfghjklzxcvblanbo"
Dim attach_my,body,getMCHID,notify_url,openid,out_trade_no,create_ip,getPartnerKey As String

Dim st As New Date(1970,1,1,8,0,0)
Dim getAppId As String = "wxa7154bc4751eddec" '开发者ID
Dim timestamp As Integer = CInt((Date.Now - st).TotalSeconds()) '时间戳
Dim total_fee
attach_my ="支付测试"
body = "test"
getMCHID ="1488726912"
Dim nonce_str As String = Rand.NextString(16) '随机字符
notify_url ="http://www.664748.top/hello.htm"
openid = "ofRouwl_aRCGFTkhxeVECkQmzd8g"
out_trade_no ="1415659990"
create_ip="106.14.79.51"
total_fee =1
getPartnerKey = "hahaqwertyuioasdfghjklzxcvblanbo"
sign="appid=" & getAppId & "&attach=" & attach_my & "&body=" & body & "&mch_id=" & getMCHID & "&n&notify_url=" & notify_url & "&openid=" & openid & "&out_trade_no=" & out_trade_no & "&spbill_create_ip=" & create_ip & "&total_fee=" & total_fee & "&trade_type=JSAPI&key=" & getPartnerKey
Output.Show(sign)
Dim md5  = System.Security.Cryptography.MD5.Create()
Dim bs = md5.ComputeHash(Encoding.UTF8.GetBytes(sign))
Dim sb As new StringBuilder()
For Each b As Byte In bs
    sb.Append(b.ToString("x2"))
Next
sign = sb.ToString().ToUpper()
msgbox(sign)
'sign  = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(sign, "MD5")
Dim xml As String
Dim xo As New XObject
xo.AddCDATA("appid",getAppId)
xo.AddCDATA("attach",attach_my)
xo.AddCDATA("body",body)
xo.AddCDATA("mch_id",getMCHID )
xo.AddCDATA("nonce_str",nonce_str)
xo.AddCDATA("notify_url",notify_url)
xo.AddCDATA("openid",openid)
xo.AddCDATA("out_trade_no",out_trade_no)
xo.AddCDATA("spbill_create_ip",create_ip)
xo.AddCDATA("total_fee",total_fee)
xo.AddCDATA("trade_type","JSAPI")
xo.AddCDATA("sign",sign)
'Dim hc As New HttpClient("https://api.mch.weixin.qq.com/pay/unifiedorder")
'hc.FormData.Add("xml",xo.ToXML)
'hc.C
'hc.Content = xo.ToXML
'MessageBox.Show(hc.getdata)
'

Dim hc As New HttpClient("https://api.mch.weixin.qq.com/pay/unifiedorder")
hc.Content =  xo.ToXML
MessageBox.Show(hc.getdata)


 回到顶部
帅哥,在线噢!
有点蓝
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:106134 积分:539787 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2018/2/11 16:28:00 [显示全部帖子]

无效的notify_url

通知地址notify_urlString(256)http://www.weixin.qq.com/wxpay/pay.php异步接收微信支付结果通知的回调地址,通知url必须为外网可访问的url,不能携带参数。

 回到顶部
帅哥,在线噢!
有点蓝
  6楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:106134 积分:539787 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2018/2/11 16:37:00 [显示全部帖子]

就是公众号的回调:http://www.foxtable.com/mobilehelp/scr/0175.htm

麻烦看熟微信的文档在做开发好吗?起码理解一些基本的概念

 回到顶部