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
29af874b
Commit
29af874b
authored
Aug 19, 2021
by
wanjilong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 多子单支付
parent
038229f0
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
72 deletions
+95
-72
RefundException.php
application/exception/custom/RefundException.php
+3
-0
Order.php
application/modules/Pay/controllers/Order.php
+9
-3
RefundService.php
application/services/refund/RefundService.php
+83
-69
No files found.
application/exception/custom/RefundException.php
View file @
29af874b
...
@@ -26,5 +26,8 @@ class RefundException extends BaseException
...
@@ -26,5 +26,8 @@ class RefundException extends BaseException
11
=>
'pingxx退单缺少matadata!'
,
11
=>
'pingxx退单缺少matadata!'
,
12
=>
'pingxx未支付订单不允许退款。'
,
12
=>
'pingxx未支付订单不允许退款。'
,
13
=>
'pingxx订单可能存在多次成功支付,需人工确认处理。'
,
13
=>
'pingxx订单可能存在多次成功支付,需人工确认处理。'
,
14
=>
'不存在满足条件的退款订单。'
,
15
=>
'订单未支付或不存在,请核对。'
,
16
=>
'订单退款回调处理失败,请核对。'
,
];
];
}
}
application/modules/Pay/controllers/Order.php
View file @
29af874b
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
use
App\Base\Base
;
use
App\Base\Base
;
use
App\Exception\custom\PayException
;
use
App\Services\pay\PayService
;
use
App\Services\pay\PayService
;
use
App\Services\refund\RefundService
;
use
App\Services\refund\RefundService
;
use
Api\PhpUtils\Log\FileLog
;
use
Api\PhpUtils\Log\FileLog
;
...
@@ -40,14 +41,19 @@ class OrderController extends Base
...
@@ -40,14 +41,19 @@ class OrderController extends Base
public
function
refundAction
()
{
public
function
refundAction
()
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
$user_id
=
$params
[
'user_id'
];
$order_item_id
=
$params
[
'order_item_id'
];
$order_item_id
=
$params
[
'order_item_id'
];
if
(
!
is_array
(
$order_item_id
))
{
$order_item_id
=
explode
(
','
);
}
if
(
empty
(
$params
[
'order_id'
]))
{
throw
new
PayException
([
'cus'
=>
1
]);
}
$refundSrv
=
new
RefundService
();
$refundSrv
=
new
RefundService
();
$ret
=
$refundSrv
->
do_refund
(
$
order_item_id
,
$user
_id
);
$ret
=
$refundSrv
->
do_refund
(
$
params
[
'order_id'
],
$order_item
_id
);
$this
->
success
([
'result'
=>
$ret
]);
$this
->
success
([
'result'
=>
$ret
]);
}
}
public
function
write_offAction
()
{
public
function
write_offAction
()
{
...
...
application/services/refund/RefundService.php
View file @
29af874b
This diff is collapsed.
Click to expand it.
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