Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
T
tamp_course_order
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
彭熊
tamp_course_order
Commits
e07c12c6
Commit
e07c12c6
authored
May 21, 2021
by
etscript
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加直播中课程支付
parent
936844d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
order_service.py
app/service/order_service.py
+29
-0
No files found.
app/service/order_service.py
View file @
e07c12c6
...
...
@@ -37,6 +37,8 @@ course_rollback_api = "http://s-nginx/fatools/pay/course/rollback"
ad_course_rollback_api
=
"http://s-nginx/course/advertise/detail?id="
zhibo_course_rollback_api
=
"http://s-nginx/course/new/res/price?userId="
class
TopUpOrderService
:
""""""
def
__init__
(
self
):
...
...
@@ -268,6 +270,33 @@ class CurriculumOrderService:
except
:
raise
CustomFlaskErr
(
Errors
.
PROD_NOPRICE
)
elif
args
[
'ab_type'
]
==
3
:
data
=
[
{
"resId"
:
args
[
'ab_proid'
],
"columnId"
:
None
,
"tranResId"
:
None
}
]
headers
=
{
"Content-Type"
:
"application/json"
,
# "tampToken": args['tampToken'],
# "env": args['env']
}
amount
=
requests
.
post
(
zhibo_course_rollback_api
+
args
[
'user_id'
],
headers
=
headers
,
json
=
data
,
timeout
=
5
)
try
:
amount
=
amount
.
json
()
amount
=
amount
[
args
[
'ab_proid'
]]
if
amount
[
"finalChargeMode"
]
==
2
:
amount
=
[
int
(
amount
[
"finalPrice"
])]
else
:
raise
CustomFlaskErr
(
Errors
.
PROD_NOPRICE
)
except
:
raise
CustomFlaskErr
(
Errors
.
PROD_NOPRICE
)
elif
args
[
'ab_type'
]
==
300
:
data
=
{
"payReqs"
:
[{
"resId"
:
args
[
'ab_proid'
]}],
...
...
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