| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 4701 人关注过本帖
标题:VB6能做微信支付和支付宝支付二维码被扫吗?
只看楼主 加入收藏
liuzhaoyzz
Rank: 2
等 级:论坛游民
威 望:1
帖 子:12
专家分:17
注 册:2016-7-21
结帖率:0
收藏
已结贴  问题点数:20 回复次数:4 
VB6能做微信支付和支付宝支付二维码被扫吗?
    VB6能做微信支付和支付宝支付二维码被扫吗?
用户展示付款码,VB6程序用扫码枪扫描客户的二维码用于付款,能够实现吗?
   
搜索更多相关主题的帖子: VB6 支付宝 二维 扫描 客户 
2018-08-23 10:13
wlrjgzs
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:26
帖 子:212
专家分:1566
注 册:2017-4-10
收藏
得分:20 
有难度,虽然微信和支付宝均提供了API接口以及相关语言的SDK,但并没有提供适合VB使用的SDK,所以难度比较高。
2018-08-24 12:26
csl591
Rank: 4
等 级:贵宾
威 望:10
帖 子:78
专家分:92
注 册:2009-2-5
收藏
得分:0 
能实现但收不到钱。
2018-11-28 10:33
zhangjin7422
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2019-9-20
收藏
得分:0 
完全没有问题,以下是代码:
Private Declare Function WeiXinPayCodeEx1 Lib "PayApiFun.dll" (ByVal Lockappid As String, ByVal Lockmchid As String, ByVal Idkey As String, ByVal IdkeyLock As Integer, ByVal AuthCode As String, ByVal OrdNum As String, ByVal TotalFee As String, ByRef outinf As Any) As Integer
Private Declare Function WeiXinPayQRCodeEx1 Lib "PayApiFun.dll" (ByVal Lockappid As String, ByVal Lockmchid As String, ByVal Idkey As String, ByVal IdkeyLock As Integer, ByVal OrdNum As String, ByVal TotalFee As String, ByRef outinf As Any) As Integer
Private Declare Function WeiXinQueryEx1 Lib "PayApiFun.dll" (ByVal Lockappid As String, ByVal Lockmchid As String, ByVal Idkey As String, ByVal IdkeyLock As Integer, ByVal OrdNum As String, ByRef outinf As Any) As Integer
 
Private Declare Function ZhiFuBaoPayCodeEx1 Lib "PayApiFun.dll" (ByVal Lockappid As String, ByVal AuthCode As String, ByVal OrdNum As String, ByVal TotalFee As String, ByRef outinf As Any) As Integer
Private Declare Function ZhiFuBaoPayQRCodeEx1 Lib "PayApiFun.dll" (ByVal Lockappid As String, ByVal OrdNum As String, ByVal TotalFee As String, ByRef outinf As Any) As Integer
Private Declare Function ZhiFuBaoQueryEx1 Lib "PayApiFun.dll" (ByVal Lockappid As String, ByVal OrdNum As String, ByRef outinf As Any) As Integer
 
Private Sub Command16_Click()  '生成微信支付二维码
Dim resul As Integer
Dim Lockappid As String
Dim Lockmchid As String
Dim Idkey As String
Dim IdkeyLock As Integer
 
Dim AuthCode As String
Dim OrdNum As String
Dim TotalFee As String
Dim outinf(255) As Byte
 
Text4 = ""
 
Lockappid = Trim(WXGZH.Text)                            '加密后的微信公众账号
Lockmchid = Trim(WXSFH.Text)                            '加密后的商户号
Idkey = Trim(WXKEY.Text)                                'KEY
If Option2.Value Then IdkeyLock = 1 Else IdkeyLock = 0  '1 KEY已加密,0不加密
 
OrdNum = Trim(Text2.Text)
TotalFee = Trim(Text3.Text)    '总计支付金额,单位分
 
If OrdNum = "" Then MsgBox "请输入商户号内的唯一订单编号!", vbCritical + vbOKOnly, "提示": Text2.SetFocus: Exit Sub
 
Command16.Caption = "正在申请,请稍后..."
Command16.Enabled = False
 
resul = WeiXinPayQRCodeEx1(Lockappid, Lockmchid, Idkey, IdkeyLock, OrdNum, TotalFee, VarPtr(outinf(0)))
 
Select Case resul
    Case 0
        Text6.Text = Trim(MidB(StrConv(outinf, vbUnicode), 1, 255))
        Text4.Text = "微信支付单号‘" + OrdNum + "’支付二维码已经生成,有效时间5分钟,可轮询调用‘查询微信订单状态’函数查询支付结果!"
        Image1.Picture = LoadPicture(App.Path & "QRcode.BMP")
    Case 1
        Text4.Text = "微信支付单号‘" + OrdNum + "’正在申请支付二维码..." + Trim(MidB(StrConv(outinf, vbUnicode), 1, 255))
    Case -10
        Text4.Text = "微信支付单号‘" + OrdNum + "’二维支付地址:" + Trim(MidB(StrConv(outinf, vbUnicode), 1, 255))
    Case Else
        Text4.Text = "微信支付单号‘" + OrdNum + "’二维支付地址申请失败!" + Trim(MidB(StrConv(outinf, vbUnicode), 1, 255))
End Select
Command16.Caption = "生成微信支付二维码 Ex1"
Command16.Enabled = True
 
End Sub
 
Private Sub Command5_Click()  ’按单号查询支付结果
Dim Lockappid As String
Dim Lockmchid As String
Dim Idkey As String
Dim IdkeyLock As Integer
 
Dim AuthCode As String
Dim OrdNum As String
Dim TotalFee As String
Dim outinf(255) As Byte
 
Text4 = ""
 
Lockappid = Trim(WXGZH.Text)                            '加密后的微信公众账号
Lockmchid = Trim(WXSFH.Text)                            '加密后的商户号
Idkey = Trim(WXKEY.Text)                                'KEY
If Option2.Value Then IdkeyLock = 1 Else IdkeyLock = 0  '1 KEY已加密,0不加密
 
OrdNum = Trim(Text2.Text)
If OrdNum = "" Then MsgBox "请输入商户号内的唯一订单编号!", vbCritical + vbOKOnly, "提示": Text2.SetFocus: Exit Sub
 
Command5.Enabled = False
Command5.Caption = "正在查询中,请稍后..."
 
WeiXinQueryEx1 Lockappid, Lockmchid, Idkey, IdkeyLock, OrdNum, VarPtr(outinf(0))
Text4.Text = MidB(StrConv(outinf, vbUnicode), 1, 255)
 
Command5.Enabled = True
Command5.Caption = "查询订单状态 Ex1"
End Sub

2019-09-21 09:57
chenlongsoft
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2022-8-29
收藏
得分:0 
VB6微信支付&支付宝支付到个人账户源代码


官网 http://www.

下载 http://www.
2022-08-29 23:29
快速回复:VB6能做微信支付和支付宝支付二维码被扫吗?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018667 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved