Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
fusionapi
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
林洽文
fusionapi
Commits
b23fbb57
Commit
b23fbb57
authored
2 years ago
by
zazaname
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加渠道下单
parent
659ad841
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
PayService.php
app/Http/Service/PayService.php
+6
-4
No files found.
app/Http/Service/PayService.php
View file @
b23fbb57
...
@@ -56,9 +56,6 @@ class PayService
...
@@ -56,9 +56,6 @@ class PayService
if
(
is_null
(
$verInfo
))
{
if
(
is_null
(
$verInfo
))
{
return
error
(
'该游戏渠道没配置,app_id:'
.
$params
[
'app_id'
]);
return
error
(
'该游戏渠道没配置,app_id:'
.
$params
[
'app_id'
]);
}
}
// 走一下渠道的下单接口,如果部分渠道没有,则返回空
$sdkManager
=
new
SdkManager
();
$channel_order_id
=
$sdkManager
->
createOrder
(
$verInfo
,
$gameInfo
,
$params
);
// 查找融合用户信息
// 查找融合用户信息
$userInfo
=
DB
::
table
(
'app_member'
)
->
where
([
'uid'
=>
$params
[
'uid'
]])
->
first
();
$userInfo
=
DB
::
table
(
'app_member'
)
->
where
([
'uid'
=>
$params
[
'uid'
]])
->
first
();
// 入库
// 入库
...
@@ -67,7 +64,6 @@ class PayService
...
@@ -67,7 +64,6 @@ class PayService
'uid'
=>
$params
[
'uid'
],
'uid'
=>
$params
[
'uid'
],
'order_id'
=>
$orderId
,
'order_id'
=>
$orderId
,
'cp_order_id'
=>
$params
[
'cp_order_id'
],
'cp_order_id'
=>
$params
[
'cp_order_id'
],
'channel_order_id'
=>
$channel_order_id
,
'veruniqid'
=>
$userInfo
->
veruniqid
,
'veruniqid'
=>
$userInfo
->
veruniqid
,
'ver'
=>
$params
[
'ctype'
],
'ver'
=>
$params
[
'ctype'
],
'appid'
=>
$params
[
'app_id'
],
'appid'
=>
$params
[
'app_id'
],
...
@@ -83,6 +79,12 @@ class PayService
...
@@ -83,6 +79,12 @@ class PayService
'create_time'
=>
date
(
'Y-m-d H:i:s'
)
'create_time'
=>
date
(
'Y-m-d H:i:s'
)
];
];
$model
->
insert
(
$insertData
);
$model
->
insert
(
$insertData
);
// 走一下渠道的下单接口,如果部分渠道没有,则返回空
$sdkManager
=
new
SdkManager
();
$channel_order_id
=
$sdkManager
->
createOrder
(
$verInfo
,
$gameInfo
,
$params
);
if
(
$channel_order_id
){
$model
->
where
([
'order_id'
=>
$orderId
])
->
update
([
'channel_order_id'
=>
$channel_order_id
]);
}
return
success
(
'success'
,[
'order_id'
=>
$orderId
,
'channel_order_id'
=>
$channel_order_id
]);
return
success
(
'success'
,[
'order_id'
=>
$orderId
,
'channel_order_id'
=>
$channel_order_id
]);
}
}
...
...
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