Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
Rock Zhang
2016-04-28 18:11:54 +0800
Commit
f39d6b2ec264a856e0f39fa05888a461b7807202
1 parent
7227b0fe
添加支付时保存用户id到sesion以防止cookie中uid信息丢失
Code Review By Rock Zhang
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
yohobuy/www.yohobuy.com/application/modules/Pay/controllers/Notice.php
yohobuy/www.yohobuy.com/application/modules/Shopping/controllers/Pay.php
yohobuy/www.yohobuy.com/application/modules/Pay/controllers/Notice.php
View file @
f39d6b2
...
...
@@ -366,7 +366,10 @@ class NoticeController extends WebAction
$log
->
LogInfo
(
var_export
(
$payResult
,
true
));
//判断是否登录
$uid
=
$this
->
auditJumpLogin
();
$uid
=
$this
->
getUid
();
if
(
empty
(
$uid
))
{
// cookie中获取为空时再从之前保存的session中获取
$uid
=
$this
->
getSession
(
'payUserid'
);
}
$log
->
LogInfo
(
'================已登录,获取到用户ID============'
);
...
...
yohobuy/www.yohobuy.com/application/modules/Shopping/controllers/Pay.php
View file @
f39d6b2
...
...
@@ -25,6 +25,8 @@ class PayController extends WebAction
if
(
!
$uid
)
{
$this
->
go
(
Helpers
::
url
(
'/signin.html'
,
array
(
'refer'
=>
$this
->
server
(
'HTTP_REFERER'
,
SITE_MAIN
)))
);
}
// 将用户UID存入session中以便支付成功回调使用
$this
->
setSession
(
'payUserid'
,
$uid
);
// 订单号
$orderCode
=
$this
->
get
(
'order_code'
,
$this
->
get
(
'ordercode'
));
...
...
Please
register
or
login
to post a comment