Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
service
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
1
Merge Requests
1
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
aimeiyue
service
Commits
77830390
Commit
77830390
authored
Feb 06, 2025
by
lizhilin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
4a00cd58
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
app/Models/Adapay.php
+7
-4
config/admin.php
+1
-1
No files found.
app/Models/Adapay.php
View file @
77830390
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
use
Illuminate\Support\Facades\DB
;
use
Illuminate\Support\Facades\DB
;
use
App\Models\Good
as
GoodModel
;
use
App\Models\Good
as
GoodModel
;
use
App\Models\GoodSku
;
use
App\Models\GoodSku
;
use
Exception
;
use
NwVVVS\AdapayCore\AdaPay\Payment
;
use
NwVVVS\AdapayCore\AdaPay\Payment
;
class
Adapay
class
Adapay
...
@@ -168,12 +169,13 @@ public function payNotify($params = [])
...
@@ -168,12 +169,13 @@ public function payNotify($params = [])
"description"
=>
""
,
"description"
=>
""
,
"div_members"
=>
""
//分账参数列表 默认是数组List
"div_members"
=>
""
//分账参数列表 默认是数组List
);
);
//分账列表
$payment_params
[
'div_members'
]
=
OrderDivideRecord
::
divide
(
$orderObj
->
id
);
//返回分账参数列表
Log
::
add
(
'发起支付确认'
.
$order_no
,
$payment_params
);
DB
::
beginTransaction
();
DB
::
beginTransaction
();
try
{
try
{
//分账列表
$payment_params
[
'div_members'
]
=
OrderDivideRecord
::
divide
(
$orderObj
->
id
);
//返回分账参数列表
Log
::
add
(
'发起支付确认'
.
$order_no
,
$payment_params
);
# 发起支付确认创建
# 发起支付确认创建
$payment_confirm
->
create
(
$payment_params
);
$payment_confirm
->
create
(
$payment_params
);
# 对支付确认创建结果进行处理
# 对支付确认创建结果进行处理
...
@@ -181,6 +183,7 @@ public function payNotify($params = [])
...
@@ -181,6 +183,7 @@ public function payNotify($params = [])
//失败处理
//失败处理
Log
::
add
(
'支付确认失败'
,
$payment_confirm
->
result
);
Log
::
add
(
'支付确认失败'
,
$payment_confirm
->
result
);
$result
=
$payment_confirm
->
result
;
$result
=
$payment_confirm
->
result
;
throw
new
Exception
(
$result
[
'error_msg'
]);
}
else
{
}
else
{
//成功处理
//成功处理
Log
::
add
(
'支付确认成功'
,
$payment_confirm
->
result
);
Log
::
add
(
'支付确认成功'
,
$payment_confirm
->
result
);
...
@@ -193,7 +196,7 @@ public function payNotify($params = [])
...
@@ -193,7 +196,7 @@ public function payNotify($params = [])
DB
::
commit
();
DB
::
commit
();
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
Log
::
add
(
'支付确认对象失败'
,
$e
);
Log
::
add
(
'支付确认对象失败'
,
$e
->
getMessage
()
);
DB
::
rollBack
();
DB
::
rollBack
();
return
false
;
return
false
;
}
}
...
...
config/admin.php
View file @
77830390
...
@@ -200,7 +200,7 @@
...
@@ -200,7 +200,7 @@
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
*/
*/
'helpers'
=>
[
'helpers'
=>
[
'enable'
=>
tru
e
,
'enable'
=>
fals
e
,
],
],
/*
/*
...
...
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