Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jcy2004x
ShopXO
提交
c1499a40
ShopXO
项目概览
jcy2004x
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
c1499a40
编写于
9月 19, 2020
作者:
D
devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
qq小程序微信支付debug
上级
37fdd14f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
49 addition
and
18 deletion
+49
-18
application/service/OrderService.php
application/service/OrderService.php
+7
-0
extend/payment/Weixin.php
extend/payment/Weixin.php
+7
-3
sourcecode/qq/pages/user-order/user-order.js
sourcecode/qq/pages/user-order/user-order.js
+35
-15
未找到文件。
application/service/OrderService.php
浏览文件 @
c1499a40
...
...
@@ -288,6 +288,13 @@ class OrderService
// 支付日志id
'order_id'
=>
$pay_log
[
'data'
][
'id'
],
'order_no'
=>
$pay_log
[
'data'
][
'log_no'
],
// 支付方式信息
'payment'
=>
[
'id'
=>
$payment
[
'id'
],
'name'
=>
$payment
[
'name'
],
'payment'
=>
$payment
[
'payment'
],
],
];
// 是否线下支付
...
...
extend/payment/Weixin.php
浏览文件 @
c1499a40
...
...
@@ -52,7 +52,7 @@ class Weixin
'name'
=>
'微信'
,
// 插件名称
'version'
=>
'1.1.1'
,
// 插件版本
'apply_version'
=>
'不限'
,
// 适用系统版本描述
'apply_terminal'
=>
[
'pc'
,
'h5'
,
'ios'
,
'android'
,
'weixin'
,
'toutiao'
],
// 适用终端 默认全部 ['pc', 'h5', 'app', 'alipay', 'weixin', 'baidu']
'apply_terminal'
=>
[
'pc'
,
'h5'
,
'ios'
,
'android'
,
'weixin'
,
'toutiao'
,
'qq'
],
// 适用终端 默认全部 ['pc', 'h5', 'app', 'alipay', 'weixin', 'baidu']
'desc'
=>
'适用公众号+PC+H5+APP+[微信|头条]小程序,即时到帐支付方式,买家的交易资金直接打入卖家账户,快速回笼交易资金。 <a href="https://pay.weixin.qq.com/" target="_blank">立即申请</a>'
,
// 插件描述(支持html)
'author'
=>
'Devil'
,
// 开发者
'author_url'
=>
'http://shopxo.net/'
,
// 开发者主页
...
...
@@ -337,8 +337,11 @@ class Weixin
return
DataReturn
(
'支付类型不匹配'
,
-
1
);
}
// 平台
$client_type
=
ApplicationClientType
();
// openid
if
(
APPLICATION
==
'app
'
)
if
(
$client_type
==
'weixin
'
)
{
$openid
=
isset
(
$params
[
'user'
][
'weixin_openid'
])
?
$params
[
'user'
][
'weixin_openid'
]
:
''
;
}
else
{
...
...
@@ -346,7 +349,7 @@ class Weixin
}
// appid
$appid
=
(
APPLICATION
==
'app
'
)
?
$this
->
config
[
'mini_appid'
]
:
$this
->
config
[
'appid'
];
$appid
=
(
$client_type
==
'weixin
'
)
?
$this
->
config
[
'mini_appid'
]
:
$this
->
config
[
'appid'
];
// 异步地址处理
$notify_url
=
(
__MY_HTTP__
==
'https'
&&
isset
(
$this
->
config
[
'agreement'
])
&&
$this
->
config
[
'agreement'
]
==
1
)
?
'http'
.
mb_substr
(
$params
[
'notify_url'
],
5
,
null
,
'utf-8'
)
:
$params
[
'notify_url'
];
...
...
@@ -389,6 +392,7 @@ class Weixin
'weixin'
=>
'JSAPI'
,
'h5'
=>
'MWEB'
,
'toutiao'
=>
'MWEB'
,
'qq'
=>
'MWEB'
,
'app'
=>
'APP'
,
'ios'
=>
'APP'
,
'android'
=>
'APP'
,
...
...
sourcecode/qq/pages/user-order/user-order.js
浏览文件 @
c1499a40
...
...
@@ -233,21 +233,41 @@ Page({
switch
(
res
.
data
.
data
.
is_payment_type
)
{
// 正常线上支付
case
0
:
qq
.
requestPayment
({
package
:
res
.
data
.
data
.
data
,
success
:
function
(
res
)
{
// 数据设置
self
.
order_item_pay_success_handle
(
order_ids
);
// 跳转支付页面
qq
.
navigateTo
({
url
:
"
/pages/paytips/paytips?code=9000
"
});
},
fail
:
function
(
res
)
{
app
.
showToast
(
'
支付失败
'
);
}
});
// 是否微信支付
if
(
res
.
data
.
data
.
payment
.
payment
==
'
Weixin
'
)
{
qq
.
requestWxPayment
({
url
:
res
.
data
.
data
.
data
,
referer
:
app
.
data
.
request_url
,
success
:
function
(
res
)
{
// 数据设置
self
.
order_item_pay_success_handle
(
order_ids
);
// 跳转支付页面
qq
.
navigateTo
({
url
:
"
/pages/paytips/paytips?code=9000
"
});
},
fail
:
function
(
res
)
{
app
.
showToast
(
'
支付失败
'
);
}
});
}
else
{
qq
.
requestPayment
({
package
:
res
.
data
.
data
.
data
,
success
:
function
(
res
)
{
// 数据设置
self
.
order_item_pay_success_handle
(
order_ids
);
// 跳转支付页面
qq
.
navigateTo
({
url
:
"
/pages/paytips/paytips?code=9000
"
});
},
fail
:
function
(
res
)
{
app
.
showToast
(
'
支付失败
'
);
}
});
}
break
;
// 线下支付
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录