切换导航条
此项目
正在载入...
登录
李涵
/
integral
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
差异文件
浏览文件
作者
李涵
6 years ago
提交
1ca3d5d45812e1cca9d59349e9cc04404810e178
2 个父辈
a97d204f
8806b399
1 个管道 的构建
通过
耗费 0 秒
合并分支 'li' 到 'master'
测试 查看合并请求
!45
变更
3
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
25 行增加
和
4 行删除
app/pay/controller/PayController.php
public/themes/simpleboot3/cart/zj_cart/order_confirm.html
simplewind/extend/Payment.php
app/pay/controller/PayController.php
查看文件 @
1ca3d5d
...
...
@@ -89,7 +89,25 @@ class PayController extends HomeBaseController
public
function
notify
()
{
$pay
=
new
\Payment
();
$pay
->
handleNotify
();
$notify
=
$pay
->
handleNotify
();
if
(
!
empty
(
$notify
))
{
$oid
=
$notify
[
'attach'
];
if
(
Db
::
name
(
'zj_order'
)
->
where
([
'id'
=>
$oid
])
->
value
(
'step'
)
==
2
)
{
echo
"<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>"
;
exit
();
}
else
{
//改变订单状态
$update
=
[
'id'
=>
$oid
,
'step'
=>
2
];
if
(
Db
::
name
(
'zj_order'
)
->
update
(
$update
))
{
echo
"<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>"
;
exit
();
}
}
}
}
}
\ No newline at end of file
...
...
public/themes/simpleboot3/cart/zj_cart/order_confirm.html
查看文件 @
1ca3d5d
...
...
@@ -233,6 +233,9 @@
if
(
pay_type
==
''
)
{
return
false
;
}
if
(
address_id
==
''
)
{
return
false
;
}
$
.
ajax
({
url
:
"{:url('pay/Pay/done')}"
,
data
:{
...
...
@@ -253,7 +256,7 @@
paySign
:
data
.
data
.
paySign
,
// 支付签名
success
:
function
(
res
)
{
window
.
location
.
href
=
data
.
url
;
}
}
,
});
}
}
...
...
@@ -288,7 +291,7 @@
wx
.
config
({
debug
:
tru
e
,
// 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
debug
:
fals
e
,
// 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
appId
:
'{$js_sdk.appId}'
,
// 必填,公众号的唯一标识
timestamp
:
'{$js_sdk.timestamp}'
,
// 必填,生成签名的时间戳
nonceStr
:
'{$js_sdk.nonceStr}'
,
// 必填,生成签名的随机串
...
...
simplewind/extend/Payment.php
查看文件 @
1ca3d5d
...
...
@@ -170,7 +170,7 @@ class Payment {
$signA
=
"appid="
.
$data
[
'appid'
]
.
"&attach="
.
$data
[
'attach'
]
.
"&bank_type="
.
$data
[
'bank_type'
]
.
"&cash_fee="
.
$data
[
'cash_fee'
]
.
"&fee_type="
.
$data
[
'fee_type'
]
.
"&is_subscribe="
.
$data
[
'is_subscribe'
]
.
"&mch_id="
.
$data
[
'mch_id'
]
.
"&nonce_str="
.
$data
[
'nonce_str'
]
.
"&openid="
.
$data
[
'openid'
]
.
"&out_trade_no="
.
$data
[
'out_trade_no'
]
.
"&result_code="
.
$data
[
'result_code'
]
.
"&return_code="
.
$data
[
'return_code'
]
.
"&time_end="
.
$data
[
'time_end'
]
.
"&total_fee="
.
$data
[
'total_fee'
]
.
"&trade_type="
.
$data
[
'trade_type'
]
.
"&transaction_id="
.
$data
[
'transaction_id'
]
.
"&key="
.
config
(
'Key'
);
$sign
=
strtoupper
(
MD5
(
$signA
));
if
(
$sign
==
$data
[
'sign'
])
{
return
$data
[
'attach'
]
;
return
$data
;
}
else
{
return
false
;
}
...
...
请
注册
或
登录
后发表评论