This commit is contained in:
yumoqing 2025-12-18 15:51:48 +08:00
parent 9765acb850
commit f101490df0
2 changed files with 3 additions and 2 deletions

View File

@ -175,7 +175,7 @@ async def alipay_notify(request):
async def setup_callback_path(app): async def setup_callback_path(app):
app.router.add_post('/unipay/notify/wechat', wechat_notify) app.router.add_post('/unipay/notify/wechat', wechat_notify)
app.router.add_post('/unipay/notify/alipay', wechat_notify) app.router.add_post('/unipay/notify/alipay', alipay_notify)
# callback url= "/unipay/notify/{provider}" # callback url= "/unipay/notify/{provider}"

View File

@ -244,7 +244,8 @@ class WechatGateway(Gateway):
payer info payer info
""" """
headers = request.headers headers = request.headers
body = await request.read().decode('utf-8') body = await request.read()
body = body.decode('utf-8')
await self._verify_callback(headers, body) await self._verify_callback(headers, body)
payload = json.loads(body) payload = json.loads(body)