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
1e755036
Commit
1e755036
authored
Nov 30, 2020
by
pengxiong@wealthgrow.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支付通知
parent
d8e56844
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
+4
-2
engine.py
app/api/engine.py
+1
-1
alipayWap.py
app/utils/alipay/alipayWap.py
+1
-0
wx_app_pay.py
app/utils/wxpay/wx_app_pay.py
+2
-1
No files found.
app/api/engine.py
View file @
1e755036
...
@@ -42,7 +42,7 @@ tamp_pay_engine = create_engine(
...
@@ -42,7 +42,7 @@ tamp_pay_engine = create_engine(
user
=
config
[
env
][
'MySQL'
][
'user'
],
user
=
config
[
env
][
'MySQL'
][
'user'
],
password
=
config
[
env
][
'MySQL'
][
'password'
],
password
=
config
[
env
][
'MySQL'
][
'password'
],
charset
=
"utf8"
),
charset
=
"utf8"
),
echo
=
Tru
e
echo
=
Fals
e
)
)
# redis = redis.StrictRedis(
# redis = redis.StrictRedis(
...
...
app/utils/alipay/alipayWap.py
View file @
1e755036
...
@@ -77,6 +77,7 @@ def init_alipay(notify_url):
...
@@ -77,6 +77,7 @@ def init_alipay(notify_url):
def
prePay
(
subject
,
out_trade_no
,
total_amount
,
notify_url
):
def
prePay
(
subject
,
out_trade_no
,
total_amount
,
notify_url
):
"""创建预付订单."""
"""创建预付订单."""
print
(
'notify_url'
,
notify_url
)
result
=
init_alipay
(
notify_url
)
.
api_alipay_trade_app_pay
(
result
=
init_alipay
(
notify_url
)
.
api_alipay_trade_app_pay
(
subject
=
subject
,
subject
=
subject
,
out_trade_no
=
out_trade_no
,
out_trade_no
=
out_trade_no
,
...
...
app/utils/wxpay/wx_app_pay.py
View file @
1e755036
...
@@ -41,6 +41,7 @@ class WXPay(object):
...
@@ -41,6 +41,7 @@ class WXPay(object):
def
__init__
(
self
,
out_trade_no
,
body
,
total_fee
,
remote_addr
,
notify_url
):
def
__init__
(
self
,
out_trade_no
,
body
,
total_fee
,
remote_addr
,
notify_url
):
"""线上:tamper.tanpuyun.com
"""线上:tamper.tanpuyun.com
测试:testtamper.tanpuyun.com"""
测试:testtamper.tanpuyun.com"""
print
(
'notify_url'
,
notify_url
)
self
.
timeStamp
=
int
(
time
.
time
())
self
.
timeStamp
=
int
(
time
.
time
())
self
.
req_url
=
'https://api.mch.weixin.qq.com/pay/unifiedorder'
self
.
req_url
=
'https://api.mch.weixin.qq.com/pay/unifiedorder'
self
.
appid
=
'wx3ad4c5856975a2c4'
self
.
appid
=
'wx3ad4c5856975a2c4'
...
@@ -50,7 +51,7 @@ class WXPay(object):
...
@@ -50,7 +51,7 @@ class WXPay(object):
self
.
sign_type
=
'MD5'
self
.
sign_type
=
'MD5'
self
.
body
=
body
self
.
body
=
body
self
.
out_trade_no
=
out_trade_no
self
.
out_trade_no
=
out_trade_no
self
.
total_fee
=
total_fee
self
.
total_fee
=
int
(
total_fee
)
self
.
spbill_create_ip
=
remote_addr
self
.
spbill_create_ip
=
remote_addr
self
.
notify_url
=
notify_url
self
.
notify_url
=
notify_url
self
.
trade_type
=
'APP'
self
.
trade_type
=
'APP'
...
...
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