bugfix
This commit is contained in:
parent
83439df2e6
commit
728ae2813e
@ -161,14 +161,16 @@ async def alipay_notify(request):
|
|||||||
e = Exception(f'{provider} cannot pay')
|
e = Exception(f'{provider} cannot pay')
|
||||||
exception(f'{e}')
|
exception(f'{e}')
|
||||||
return
|
return
|
||||||
|
data = None
|
||||||
try:
|
try:
|
||||||
data = await PROVIDERS[provider].handle_notify(request)
|
data = await PROVIDERS[provider].handle_notify(request)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
e = Exception(f'{provider} cannot pay')
|
e = Exception(f'{provider} cannot pay')
|
||||||
exception(f'{e}')
|
exception(f'{e}')
|
||||||
return
|
return
|
||||||
|
debug(f'{data=}')
|
||||||
try:
|
try:
|
||||||
await unipay_accounting(request, data)
|
await unipay_accounting(request, data.data)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
exception(f'{e}')
|
exception(f'{e}')
|
||||||
return {"code":"SUCCESS", "message":"OK"}
|
return {"code":"SUCCESS", "message":"OK"}
|
||||||
|
|||||||
@ -73,8 +73,8 @@ class PaymentLog:
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
async def unipay_accounting(request, data):
|
async def unipay_accounting(request, data):
|
||||||
logid = data.params.out_trade_no
|
logid = data.out_trade_no
|
||||||
trade_id = data.params.trade_no
|
trade_id = data.trade_no
|
||||||
env = request._run_ns
|
env = request._run_ns
|
||||||
db = DBPools()
|
db = DBPools()
|
||||||
dbname = env.get_module_dbname('unipay')
|
dbname = env.get_module_dbname('unipay')
|
||||||
|
|||||||
@ -255,7 +255,7 @@ class WechatGateway(Gateway):
|
|||||||
# 返回标准结构
|
# 返回标准结构
|
||||||
ret = {
|
ret = {
|
||||||
"provider": "wechat",
|
"provider": "wechat",
|
||||||
"params": decrypted
|
"data": decrypted
|
||||||
}
|
}
|
||||||
return DictObject(**ret)
|
return DictObject(**ret)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user