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
dd255f3a
Commit
dd255f3a
authored
Nov 28, 2020
by
pengxiong@wealthgrow.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支付宝微信支付读配置文件
parent
69172562
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
3 deletions
+20
-3
config.yaml
app/config/config.yaml
+6
-0
alipayWap.py
app/utils/alipay/alipayWap.py
+2
-2
wx_app_pay.py
app/utils/wxpay/wx_app_pay.py
+4
-1
tamp_course_order.log
logs/tamp_course_order.log
+8
-0
No files found.
app/config/config.yaml
View file @
dd255f3a
...
...
@@ -17,6 +17,8 @@ dev:
datefmt
:
"
%Y-%m-%d
%H:%M:%S
%a"
token_auth_url
:
https://devtamper.tanpuyun.com/fatools/token/auth
pay_url_prefix
:
https://devtamper.tanpuyun.com
test
:
MySQL
:
tamp_user_db
:
tamp_user
...
...
@@ -36,6 +38,8 @@ test:
datefmt
:
"
%Y-%m-%d
%H:%M:%S
%a"
token_auth_url
:
https://testtamper.tanpuyun.com/fatools/token/auth
pay_url_prefix
:
https://testtamper.tanpuyun.com
prod
:
MySQL
:
tamp_user_db
:
tamp_user
...
...
@@ -55,5 +59,7 @@ prod:
datefmt
:
"
%Y-%m-%d
%H:%M:%S
%a"
token_auth_url
:
https://tamper.tanpuyun.com/fatools/token/auth
pay_url_prefix
:
https://tamper.tanpuyun.com
app/utils/alipay/alipayWap.py
View file @
dd255f3a
...
...
@@ -23,7 +23,7 @@ from urllib.parse import urlparse, parse_qs, unquote
# -----------------------------------------------------------------------------
# Classes
# -----------------------------------------------------------------------------
from
app.api.engine
import
config
,
env
alipay_public_key_string
=
'''-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhTT+Cn3Y+BYysAqXsjAqjJ14aUzvUHKz0LnaAifTE10IRyzzcFn+8SXIhzHoJ/OQrj7DPoDV18iSX7PcHPDdRCFyOBP1RQkxFLmnpqFY6BRoEm6kaWea0rfg44EXgZSCO0e7gwjez8W4zO7S9w+HOECbB61ZfmsM+oTT41kUyXmcpUgvkSiayxyeNcnzSiS06GuoMbSpaVSjAoTAiFZdyaB51+wDXf3JvZARnlvnD2Jk5sFDzZbeVIfygInFo/ICIQRr96Jfwcey9ZO3PfvxZlDqa0cbCmZi7PyMIlwVf/bHF+rwiXboJm+rauu+Py4ch5BrakWVF/kty+jitLxD6QIDAQAB
...
...
@@ -58,7 +58,7 @@ hwtSuAgS7rSrMeMS9omsZro9L1eHDjA8Ja4L0UNGi7i8dGFnp1BtOQ==
-----END PRIVATE KEY-----'''
APP_ID
=
'2021002112638152'
URL_PREFIX
=
'https://tampe.tanpuyun.com'
URL_PREFIX
=
config
[
env
][
'pay_url_prefix'
]
ssl
.
_create_default_https_context
=
ssl
.
_create_unverified_context
...
...
app/utils/wxpay/wx_app_pay.py
View file @
dd255f3a
...
...
@@ -25,6 +25,9 @@ from xml.etree import cElementTree as etree
import
random
from
urllib
import
parse
from
app.api.engine
import
config
,
env
def
genNonce_str
():
"""."""
sss
=
'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
...
...
@@ -40,7 +43,7 @@ class WXPay(object):
测试:testtamper.tanpuyun.com"""
self
.
timeStamp
=
int
(
time
.
time
())
self
.
req_url
=
'https://api.mch.weixin.qq.com/pay/unifiedorder'
self
.
url_prefix
=
'https://tampe.tanpuyun.com'
self
.
url_prefix
=
config
[
env
][
'pay_url_prefix'
]
self
.
appid
=
'wx3ad4c5856975a2c4'
self
.
mch_id
=
'1515329071'
self
.
nonce_str
=
genNonce_str
()
...
...
logs/tamp_course_order.log
View file @
dd255f3a
...
...
@@ -32378,3 +32378,11 @@ WHERE order_flow.ab_ordernum = %(ab_ordernum_1)s
LIMIT %(param_1)s
2020-11-28 14:37:24 Sat sqlalchemy.engine.base.Engine INFO {'ab_ordernum_1': 'D-20502008354149580', 'param_1': 1}
2020-11-28 14:37:24 Sat sqlalchemy.engine.base.Engine INFO COMMIT
2020-11-28 15:08:23 Sat werkzeug INFO * Running on http://0.0.0.0:80/ (Press CTRL+C to quit)
2020-11-28 15:08:23 Sat werkzeug INFO * Restarting with stat
2020-11-28 15:08:25 Sat werkzeug WARNING * Debugger is active!
2020-11-28 15:08:25 Sat werkzeug INFO * Debugger PIN: 191-123-093
2020-11-28 15:08:44 Sat werkzeug INFO * Running on http://0.0.0.0:80/ (Press CTRL+C to quit)
2020-11-28 15:08:44 Sat werkzeug INFO * Restarting with stat
2020-11-28 15:08:45 Sat werkzeug WARNING * Debugger is active!
2020-11-28 15:08:45 Sat werkzeug INFO * Debugger PIN: 191-123-093
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