Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pay
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
pay
Commits
150db88f
Commit
150db88f
authored
Jul 17, 2021
by
万继龙
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'test'
add: 修复微信手续费小于1分的处理 See merge request bp/pay!22
parents
d0b7b5f8
ff1d4bd5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
Callback.php
application/modules/Pay/controllers/Callback.php
+6
-0
PayService.php
application/services/pay/PayService.php
+6
-1
Wallet.php
daemon/Wallet.php
+3
-3
No files found.
application/modules/Pay/controllers/Callback.php
View file @
150db88f
...
@@ -70,11 +70,17 @@ class CallbackController extends Base
...
@@ -70,11 +70,17 @@ class CallbackController extends Base
$params
=
$this
->
params
;
$params
=
$this
->
params
;
$date
=
$params
[
'date'
]
??
date
(
'Y-m-d'
);
$date
=
$params
[
'date'
]
??
date
(
'Y-m-d'
);
$all
=
$params
[
'all'
]
??
0
;
$timestamp
=
strtotime
(
$date
);
$timestamp
=
strtotime
(
$date
);
$start
=
date
(
'Y-m-d'
,
$timestamp
);
$start
=
date
(
'Y-m-d'
,
$timestamp
);
$end
=
date
(
'Y-m-d'
,
$timestamp
+
86400
);
$end
=
date
(
'Y-m-d'
,
$timestamp
+
86400
);
if
(
$all
!=
1
)
{
$where
[
'notify_account_status'
]
=
0
;
}
$where
[
'can_notify_account'
]
=
1
;
$where
[
'can_notify_account'
]
=
1
;
$where
[
'notify_account_times[<]'
]
=
10
;
$where
[
'notify_account_times[<]'
]
=
10
;
$where
[
'can_notify_account_time[<>]'
]
=
[
$start
,
$end
];
$where
[
'can_notify_account_time[<>]'
]
=
[
$start
,
$end
];
...
...
application/services/pay/PayService.php
View file @
150db88f
...
@@ -412,7 +412,12 @@ class PayService
...
@@ -412,7 +412,12 @@ class PayService
$wx_rate
=
config
(
'pay'
,
'pay.wechat_rate'
)
??
60
;
//微信利率 60 / 10000
$wx_rate
=
config
(
'pay'
,
'pay.wechat_rate'
)
??
60
;
//微信利率 60 / 10000
$wx_account_id
=
config
(
'pay'
,
'pay.wechat_account_id'
)
??
'1111'
;
$wx_account_id
=
config
(
'pay'
,
'pay.wechat_account_id'
)
??
'1111'
;
$total_tip
=
round
(
$wx_rate
*
$this
->
order_info
[
'payment'
]
/
10000
);
$float_tip
=
$wx_rate
*
$this
->
order_info
[
'payment'
]
/
10000
;
if
(
$float_tip
>=
1
)
{
$total_tip
=
round
(
$float_tip
);
}
else
{
$total_tip
=
0
;
}
if
(
empty
(
$total_tip
))
{
if
(
empty
(
$total_tip
))
{
return
0
;
return
0
;
}
}
...
...
daemon/Wallet.php
View file @
150db88f
...
@@ -13,12 +13,12 @@ class Wallet implements DaemonServiceInterface
...
@@ -13,12 +13,12 @@ class Wallet implements DaemonServiceInterface
*/
*/
public
function
run
()
public
function
run
()
{
{
$where
[
'notify_account_status'
]
=
0
;
$where
[
'can_notify_account'
]
=
1
;
$where
[
'can_notify_account'
]
=
1
;
$where
[
'notify_account_times[<]'
]
=
10
;
$where
[
'notify_account_times[<]'
]
=
10
;
$start
=
date
(
'Y-m-d'
,
time
()
-
2
*
86400
);
$start
=
date
(
'Y-m-d
H:i:s
'
,
time
()
-
2
*
86400
);
$end
=
date
(
'Y-m-d'
,
time
());
$end
=
date
(
'Y-m-d
H:i:s
'
,
time
());
$where
[
'can_notify_account_time[<>]'
]
=
[
$start
,
$end
];
$where
[
'can_notify_account_time[<>]'
]
=
[
$start
,
$end
];
//$where['can_notify_account_time[>]'] = date('Y-m-d', time() - 3 * 86400);
$where
[
'ORDER'
]
=
[
'can_notify_account_time'
=>
'ASC'
];
$where
[
'ORDER'
]
=
[
'can_notify_account_time'
=>
'ASC'
];
$where
[
'LIMIT'
]
=
[
0
,
50
];
$where
[
'LIMIT'
]
=
[
0
,
50
];
...
...
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