Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
quxiu
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
冷斌
quxiu
Commits
12af4e82
Commit
12af4e82
authored
Apr 15, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
7e8c937f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
+23
-2
alipay/alipay_app/notify_url.php
+23
-2
No files found.
alipay/alipay_app/notify_url.php
View file @
12af4e82
...
@@ -60,6 +60,26 @@ if($trade_status == 'TRADE_FINISHED') {
...
@@ -60,6 +60,26 @@ if($trade_status == 'TRADE_FINISHED') {
// }
// }
// else
// else
function
getConfig
(
$link
)
{
$result
=
mysqli_query
(
$link
,
"select option_value from cmf_options where option_name='configpri' "
);
$row
=
mysqli_fetch_assoc
(
$result
);
return
json_decode
(
$row
[
'option_value'
],
true
);
}
function
share
(
$link
,
$id
,
$coin
)
{
$userSql
=
mysqli_query
(
$link
,
"select * from cmf_users where id='
$id
' "
);
$user
=
mysqli_fetch_assoc
(
$userSql
);
if
(
$user
[
'pid'
]
>
0
)
{
$config
=
getConfig
(
$link
);
$invite_reward
=
!
empty
(
$config
[
'invite_reward'
])
?
$config
[
'invite_reward'
]
:
0
;
$coin2
=
(
$coin
*
$invite_reward
)
/
100
;
$c
=
(
int
)
$coin2
;
mysqli_query
(
$link
,
"update cmf_users set coin=coin+
{
$c
}
where id=
{
$user
[
'pid'
]
}
"
);
}
}
if
(
$trade_status
==
'TRADE_SUCCESS'
)
{
if
(
$trade_status
==
'TRADE_SUCCESS'
)
{
//判断该笔订单是否在商户网站中已经做过处理
//判断该笔订单是否在商户网站中已经做过处理
//如果没有做过处理,根据订单号(out_trade_no)在商户网站的订单系统中查到该笔订单的详细,并执行商户的业务程序
//如果没有做过处理,根据订单号(out_trade_no)在商户网站的订单系统中查到该笔订单的详细,并执行商户的业务程序
...
@@ -86,9 +106,10 @@ if($trade_status == 'TRADE_FINISHED') {
...
@@ -86,9 +106,10 @@ if($trade_status == 'TRADE_FINISHED') {
$result
=
mysqli_query
(
$link
,
"select * from cmf_users_charge where orderno='
$out_trade_no
' and status='0' and type='1'"
);
$result
=
mysqli_query
(
$link
,
"select * from cmf_users_charge where orderno='
$out_trade_no
' and status='0' and type='1'"
);
$row
=
mysqli_fetch_assoc
(
$result
);
$row
=
mysqli_fetch_assoc
(
$result
);
if
(
$row
){
if
(
$row
){
mysqli_query
(
$link
,
"update cmf_users set coin=coin+
{
$row
[
'coin'
]
}
where id='
$row[touid]
'"
);
$coin
=
$row
[
'give'
]
+
$row
[
'coin'
];
mysqli_query
(
$link
,
"update cmf_users set coin=coin+
{
$coin
}
where id=
{
$row
[
'touid'
]
}
"
);
mysqli_query
(
$link
,
"update cmf_users_charge set status='1',trade_no='
$trade_no
' where id=
{
$row
[
'id'
]
}
"
);
mysqli_query
(
$link
,
"update cmf_users_charge set status='1',trade_no='
$trade_no
' where id=
{
$row
[
'id'
]
}
"
);
share
(
$link
,
$row
[
'touid'
],
$coin
);
file_put_contents
(
'./logali.txt'
,
date
(
'y-m-d h:i:s'
)
.
' msg:'
.
"支付成功:
\r\n
"
,
FILE_APPEND
);
file_put_contents
(
'./logali.txt'
,
date
(
'y-m-d h:i:s'
)
.
' msg:'
.
"支付成功:
\r\n
"
,
FILE_APPEND
);
}
else
{
}
else
{
...
...
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