Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eduline
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冷斌
eduline
Commits
06923706
Commit
06923706
authored
Jun 16, 2020
by
刘海龙
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://132.232.91.252:9999/ice/eduline
parents
fd64be76
94ebe5df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
apps/classroom/Lib/Action/PayAction.class.php
+8
-8
No files found.
apps/classroom/Lib/Action/PayAction.class.php
View file @
06923706
...
@@ -181,7 +181,7 @@ class PayAction extends CommonAction
...
@@ -181,7 +181,7 @@ class PayAction extends CommonAction
$this
->
error
(
'支付类型错误'
);
$this
->
error
(
'支付类型错误'
);
}
}
$type
=
intval
(
$_POST
[
'user_vip'
]);
$type
=
intval
(
$_POST
[
'user_vip'
]);
$vip
=
M
(
'user_vip'
)
->
where
(
'id='
.
$type
)
->
find
();
$vip
=
M
(
'user_vip'
)
->
where
(
'id='
.
$type
)
->
find
();
$vip_type_time
=
$_POST
[
'vip_type_time'
];
$vip_type_time
=
$_POST
[
'vip_type_time'
];
...
@@ -453,8 +453,8 @@ class PayAction extends CommonAction
...
@@ -453,8 +453,8 @@ class PayAction extends CommonAction
'uid'
=>
intval
(
$this
->
mid
),
'uid'
=>
intval
(
$this
->
mid
),
'sid'
=>
M
(
'user'
)
->
where
([
'uid'
=>
$this
->
mid
])
->
getField
(
'mhm_id'
),
'sid'
=>
M
(
'user'
)
->
where
([
'uid'
=>
$this
->
mid
])
->
getField
(
'mhm_id'
),
'goods_id'
=>
intval
(
$_POST
[
'goods_id'
]),
'goods_id'
=>
intval
(
$_POST
[
'goods_id'
]),
'price'
=>
0
,
//intval($_POST['total']) - intval($fare)
,
'price'
=>
$_POST
[
'total'
]
-
$fare
,
'fare'
=>
0
,
//intval($fare)
,
'fare'
=>
$fare
,
'count'
=>
intval
(
$_POST
[
'count'
]),
'count'
=>
intval
(
$_POST
[
'count'
]),
'address_id'
=>
intval
(
$_POST
[
'address_id'
]),
'address_id'
=>
intval
(
$_POST
[
'address_id'
]),
//'lastPrice' =>intval($_POST['total'])+intval($_POST['fare']),
//'lastPrice' =>intval($_POST['total'])+intval($_POST['fare']),
...
@@ -630,7 +630,7 @@ class PayAction extends CommonAction
...
@@ -630,7 +630,7 @@ class PayAction extends CommonAction
$this
->
assign
(
'jumpUrl'
,
U
(
'classroom/Vip/index'
));
$this
->
assign
(
'jumpUrl'
,
U
(
'classroom/Vip/index'
));
}
}
}
}
//商户订单号
//商户订单号
$out_trade_no
=
$_GET
[
'out_trade_no'
];
$out_trade_no
=
$_GET
[
'out_trade_no'
];
//支付宝交易号
//支付宝交易号
...
@@ -715,7 +715,7 @@ class PayAction extends CommonAction
...
@@ -715,7 +715,7 @@ class PayAction extends CommonAction
$data
[
'status'
]
=
1
;
$data
[
'status'
]
=
1
;
$data
[
'stime'
]
=
time
();
$data
[
'stime'
]
=
time
();
$r_re
=
M
(
'zy_recharge'
)
->
where
(
array
(
'pay_pass_num'
=>
$args
[
'out_trade_no'
]))
->
save
(
$data
);
$r_re
=
M
(
'zy_recharge'
)
->
where
(
array
(
'pay_pass_num'
=>
$args
[
'out_trade_no'
]))
->
save
(
$data
);
if
(
false
==
$r_re
)
{
if
(
false
==
$r_re
)
{
echo
json_encode
([
'status'
=>
0
,
'info'
=>
"修改购买记录状态失败"
]);
echo
json_encode
([
'status'
=>
0
,
'info'
=>
"修改购买记录状态失败"
]);
M
()
->
rollback
();
M
()
->
rollback
();
...
@@ -726,12 +726,12 @@ class PayAction extends CommonAction
...
@@ -726,12 +726,12 @@ class PayAction extends CommonAction
if
(
!
$user
||
$args
[
'money'
]
>
$user
[
'balance'
])
{
if
(
!
$user
||
$args
[
'money'
]
>
$user
[
'balance'
])
{
echo
json_encode
([
'status'
=>
0
,
'info'
=>
"你的余额不足,请及时充值"
]);
exit
;
echo
json_encode
([
'status'
=>
0
,
'info'
=>
"你的余额不足,请及时充值"
]);
exit
;
}
}
$expire
=
3600
*
24
*
30
*
$args
[
'time'
];
$expire
=
3600
*
24
*
30
*
$args
[
'time'
];
if
(
$args
[
'expire'
]
==
'year'
){
if
(
$args
[
'expire'
]
==
'year'
){
$expire
=
3600
*
24
*
365
*
$args
[
'time'
];
$expire
=
3600
*
24
*
365
*
$args
[
'time'
];
}
}
if
(
$user
[
'vip_type'
]
==
$args
[
'vip_type'
]){
if
(
$user
[
'vip_type'
]
==
$args
[
'vip_type'
]){
$user
[
'vip_expire'
]
=
$user
[
'vip_expire'
]
>
time
()
?
$user
[
'vip_expire'
]
+
$expire
:
time
()
+
$expire
;
$user
[
'vip_expire'
]
=
$user
[
'vip_expire'
]
>
time
()
?
$user
[
'vip_expire'
]
+
$expire
:
time
()
+
$expire
;
}
else
{
}
else
{
...
@@ -761,7 +761,7 @@ class PayAction extends CommonAction
...
@@ -761,7 +761,7 @@ class PayAction extends CommonAction
echo
json_encode
([
'status'
=>
0
,
'info'
=>
"流水添加失败"
]);
echo
json_encode
([
'status'
=>
0
,
'info'
=>
"流水添加失败"
]);
M
()
->
rollback
();
M
()
->
rollback
();
}
}
//购买成功
//购买成功
if
(
$f_re
&&
$l_re
&&
$r_re
){
if
(
$f_re
&&
$l_re
&&
$r_re
){
echo
json_encode
([
'status'
=>
1
,
'info'
=>
"购买成功"
]);
echo
json_encode
([
'status'
=>
1
,
'info'
=>
"购买成功"
]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment