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
e0a1d558
Commit
e0a1d558
authored
Jul 21, 2021
by
万继龙
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'test'
add: 增加微信通知 See merge request bp/pay!27
parents
38b058d6
ea51e331
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
0 deletions
+43
-0
Notice.php
application/library/Helpers/Notice.php
+24
-0
PayService.php
application/services/pay/PayService.php
+19
-0
No files found.
application/library/Helpers/Notice.php
0 → 100644
View file @
e0a1d558
<?php
namespace
Helpers
;
use
Helpers\Sdk
;
/**
* Notice 相关操作
*/
class
Notice
{
public
static
function
weChat
(
$params
)
{
//interaction.index.wechat
$url
=
config
(
'interface'
,
'interaction.index.wechat'
);
if
(
!
$url
)
{
return
true
;
}
return
Sdk
::
call
(
$url
,
$params
);
}
}
\ No newline at end of file
application/services/pay/PayService.php
View file @
e0a1d558
...
...
@@ -17,6 +17,7 @@ use App\Services\pingxx\PingxxService;
use
App\Services\wallet\WalletService
;
use
Helpers\Strategy
;
use
Helpers\Sdk
;
use
Helpers\Notice
;
use
Yaf\Application
;
use
App\Exception\custom\PayException
;
...
...
@@ -226,6 +227,24 @@ class PayService
// 生成支付清分单
$this
->
make_order_clearing
(
$ret
[
'result'
]);
//收集第一商品名称
if
(
$this
->
order_items
)
{
$title
=
$this
->
order_items
[
0
][
'goods_name'
]
??
'商品名称'
;
}
else
{
$title
=
''
;
}
//通知消息
$notice
=
[
'title'
=>
$title
,
'user_id'
=>
$pay_order
[
'user_id'
],
'time'
=>
date
(
'Y-m-d'
),
'order_id'
=>
$pay_order
[
'order_id'
],
'amount'
=>
round
(
$pay_order
[
'pay_amount'
]
/
100
,
2
),
];
Notice
::
weChat
(
$notice
);
return
[
'pay_order_id'
=>
$pay_order_id
];
}
...
...
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