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
bf877547
Commit
bf877547
authored
Jul 09, 2021
by
万继龙
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'test'
Develop See merge request bp/pay!3
parents
77b6fad9
f4eeef64
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
6 deletions
+14
-6
Daemon.php
application/modules/Cli/controllers/Daemon.php
+2
-2
Order.php
application/modules/Pay/controllers/Order.php
+4
-1
PayService.php
application/services/pay/PayService.php
+4
-1
PingxxService.php
application/services/pingxx/PingxxService.php
+2
-1
crontab-daemon.conf
deploy/start_env/crontab/crontab-daemon.conf
+1
-0
start_daemon.sh
deploy/start_env/start_daemon.sh
+1
-1
No files found.
application/modules/Cli/controllers/Daemon.php
View file @
bf877547
...
...
@@ -27,7 +27,7 @@ class DaemonController extends Cli
if
(
empty
(
$task_name
)){
echo
<<<EOD
usage: php cli.php daemon run "t=
w
allet&n=2&j=sync_wallet"
usage: php cli.php daemon run "t=
W
allet&n=2&j=sync_wallet"
t daemo 脚本类名
n 进程数
j 进程别名,默认同脚本类名
...
...
@@ -51,4 +51,4 @@ EOD;
(
new
Daemon
(
$rename
,
$task_class
,
$worker_num
))
->
start
();
}
}
\ No newline at end of file
}
application/modules/Pay/controllers/Order.php
View file @
bf877547
...
...
@@ -20,7 +20,10 @@ class OrderController extends Base
$paySrv
=
new
PayService
();
$ret
=
$paySrv
->
do_pay
(
$order_id
,
$user_id
);
$this
->
success
([
'result'
=>
$ret
]);
//兼容C端客户端支付,调整返回结构,ping++ 返回 order,原生:微信、支付宝返回charge
$result
=
[];
$result
[]
=
[
'k'
=>
'order'
,
'v'
=>
$ret
];
$this
->
success
([
'result'
=>
$result
]);
}
public
function
refundAction
()
{
...
...
application/services/pay/PayService.php
View file @
bf877547
...
...
@@ -535,10 +535,13 @@ class PayService
$current_tip
=
Strategy
::
getTip
(
$r
[
'payment'
],
$total_amount
,
$cleared_amount
,
$total_tip
,
$cleared_tip
);
$id
=
$this
->
gen_pay_order_clearing_item_id
();
//商家资金需要显示商品名称
if
(
$account
[
'pay_sub_type'
]
==
102
)
{
$remark
=
$r
[
'goods_name'
]
??
''
;
$remark
=
mb_strlen
(
$remark
)
>
100
?
mb_substr
(
$remark
,
0
,
100
)
.
'...'
:
''
;
if
(
mb_strlen
(
$remark
)
>
100
)
{
$remark
=
mb_substr
(
$remark
,
0
,
100
)
.
'...'
;
}
}
else
{
$remark
=
''
;
}
...
...
application/services/pingxx/PingxxService.php
View file @
bf877547
...
...
@@ -16,7 +16,8 @@ class PingxxService
private
function
__construct
()
{
Pingpp
::
setApiKey
(
'sk_test_KCaD0O5KyjzPinLynHzH4Cu1'
);
// 设置 API Key
//Pingpp::setApiKey('sk_test_KCaD0O5KyjzPinLynHzH4Cu1'); // 设置 API Key
Pingpp
::
setApiKey
(
'sk_live_9q9iLCS4mvv1a9eTq190O8K4'
);
// 正式 API Key
Pingpp
::
setPrivateKeyPath
(
ROOT_PATH
.
'/conf/your_rsa_private_key.pem'
);
// 设置私钥
Pingpp
::
setAppId
(
'app_9m1ubDG4e1mPXLCG'
);
// 设置 App ID
}
...
...
deploy/start_env/crontab/crontab-daemon.conf
0 → 100644
View file @
bf877547
59
23
* * * /
usr
/
sbin
/
logrotate
/
etc
/
logrotate
.
conf
deploy/start_env/start_daemon.sh
View file @
bf877547
...
...
@@ -56,7 +56,7 @@ php api.go2yd.com/htdocs/Website/public/cli.php Daemon run "t=$2&n=$3&j=$2"
while
true
;
do
is_master_on
=
$(
pgrep
-fc
"
$2
$1
master process
"
)
is_master_on
=
$(
pgrep
-fc
"
$2
"
)
if
[[
${
is_master_on
}
-gt
0
]]
;
then
if
[[
!
-f
"
$start_done_file
"
]]
;
then
touch
${
start_done_file
}
...
...
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