以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 支付宝支付 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=139823) |
-- 作者:wandongliang -- 发布时间:2019/8/22 12:21:00 -- 支付宝支付 按照蓝老师的指导,我将AOPSDK.dll引用到foxtable,然后按照支付宝文档调用API指引,将.NET代码,改为vb语言。 以下是现代码,为何运行之后没有任何反应?手机上也没有收到付款提示? Dim auth_code As String = args(0) \'扫描枪扫码后获取的授权码 Dim productId As String = args(1) \'订单ID Dim total_fee As Integer = args(2) \'支付金额 Dim client As Aop.Api.IAopClient = New Aop.Api.DefaultAopClient(Vars("alipay_url"),Vars("alipay_addid"),Vars("alipay_private key"), "json", "1.0", "RSA2",Vars("alipay_public key"), "GBK", False) Dim tn As String = "MICROPAY" Dim req As WxPayData = Functions.Execute("GetWxPayData") Dim dr As DataRow = DataTables(tn).Find("product_id=\'" & productId & "\'") Dim out_trade_no As String = req.GenerateOutTradeNo() Dim scene As String = "bar_code" Dim subject As String = "Smile邻间线下支付" Dim total_amount As Double = total_fee/100 Dim body As String ="欢迎光临" Dim store_id As String = "天行超市" dr("out_trade_no") = out_trade_no dr("total_fee") = total_fee Dim request As Aop.Api.Request.AlipayTradePayRequest = New Aop.Api.Request.AlipayTradePayRequest() Dim jo As New JObject jo("out_trade_no") = req.GenerateOutTradeNo() jo("scene") = "bar_code" jo("auth_code") = auth_code jo("subject") = subject jo("total_amount") = "0.50" jo("body") = body jo("store_id") = store_id request.BizContent = jo.ToString Dim response As Aop.Api.Response.AlipayTradePayResponse = client.execute(request) MessageBox.Show(response.ReceiptAmount) |
-- 作者:有点蓝 -- 发布时间:2019/8/22 13:44:00 -- 现在没有环境测试,请自行核对官方开发文档的返回结果,分析是什么原因 |
-- 作者:wandongliang -- 发布时间:2019/8/22 15:57:00 -- 已解决,感谢蓝老师的指导 |
-- 作者:lxhmax -- 发布时间:2024/4/23 8:48:00 -- 支付宝SDK接口如何设置 老师,请问你下这个不同的接口名称要怎么写? |
-- 作者:有点蓝 -- 发布时间:2024/4/23 8:51:00 -- 文档链接发过来看看 |
-- 作者:lxhmax -- 发布时间:2024/4/23 8:52:00 -- Dim request As Aop.Api.Request.AlipayTradePayRequest = New Aop.Api.Request.AlipayTradePayRequest() Dim jo As New JObject jo("out_trade_no") = req.GenerateOutTradeNo() jo("scene") = "bar_code" jo("auth_code") = auth_code jo("subject") = subject jo("total_amount") = "0.50" jo("body") = body jo("store_id") = store_id request.BizContent = jo.ToString Dim response As Aop.Api.Response.AlipayTradePayResponse = client.execute(request) MessageBox.Show(response.ReceiptAmount) 老师,这句如何改才可以获取到返回的所有信息?
https://opendocs.alipay.com/open/1f1fe18c_alipay.trade.pay?scene=32&pathHash=29c9a9ba [此贴子已经被作者于2024/4/23 8:52:11编辑过]
|
-- 作者:有点蓝 -- 发布时间:2024/4/23 9:26:00 -- 建议去咨询支付宝客服。没看到文档有说明怎么使用这个接口名称的地方。 至于返回值,应该就是文档里说的业务响应参数。如果使用foxtable新版的编辑器,应该可以通过自动列表看到response有什么属性:http://www.foxtable.com/webhelp/topics/3762.htm
|