支付通知

parent d8e56844
......@@ -42,7 +42,7 @@ tamp_pay_engine = create_engine(
user=config[env]['MySQL']['user'],
password=config[env]['MySQL']['password'],
charset="utf8"),
echo=True
echo=False
)
# redis = redis.StrictRedis(
......
......@@ -77,6 +77,7 @@ def init_alipay(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(
subject=subject,
out_trade_no=out_trade_no,
......
......@@ -41,6 +41,7 @@ class WXPay(object):
def __init__(self, out_trade_no, body, total_fee, remote_addr, notify_url):
"""线上:tamper.tanpuyun.com
测试:testtamper.tanpuyun.com"""
print('notify_url', notify_url)
self.timeStamp = int(time.time())
self.req_url = 'https://api.mch.weixin.qq.com/pay/unifiedorder'
self.appid = 'wx3ad4c5856975a2c4'
......@@ -50,7 +51,7 @@ class WXPay(object):
self.sign_type = 'MD5'
self.body = body
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.notify_url = notify_url
self.trade_type = 'APP'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment