From bde6ae9d75d12d02ae9776b23bccf597c7450d7a Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 18 Dec 2025 15:26:58 +0800 Subject: [PATCH] bugfix --- unipay/init.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/unipay/init.py b/unipay/init.py index e37489f..5d77dc3 100644 --- a/unipay/init.py +++ b/unipay/init.py @@ -139,15 +139,15 @@ async def wechat_notify(request): debug("wechat notify called .......") provider = 'wechat' if PROVIDERS[provider] is None: - e = Exception(f'{provider} cannot pay') - exception(f'{e}') - return - try: - data = await PROVIDERS[provider].handle_notify(request) - except Exception as e: - e = Exception(f'{provider} cannot pay') - exception(f'{e}') - return + e = Exception(f'{provider} cannot pay') + exception(f'{e}') + return + try: + data = await PROVIDERS[provider].handle_notify(request) + except Exception as e: + e = Exception(f'{provider} cannot pay') + exception(f'{e}') + return try: await unipay_accounting(request, data) except Exception as e: @@ -158,15 +158,15 @@ async def alipay_notify(request): debug("alipay notify called .......") provider = 'alipay' if PROVIDERS[provider] is None: - e = Exception(f'{provider} cannot pay') - exception(f'{e}') - return - try: - data = await PROVIDERS[provider].handle_notify(request) - except Exception as e: - e = Exception(f'{provider} cannot pay') - exception(f'{e}') - return + e = Exception(f'{provider} cannot pay') + exception(f'{e}') + return + try: + data = await PROVIDERS[provider].handle_notify(request) + except Exception as e: + e = Exception(f'{provider} cannot pay') + exception(f'{e}') + return try: await unipay_accounting(request, data) except Exception as e: