bugfix
This commit is contained in:
parent
df6aa60006
commit
0cebfd140f
@ -167,13 +167,16 @@ class WechatGateway(Gateway):
|
|||||||
auth = self._sign("POST", url_path, body_str)
|
auth = self._sign("POST", url_path, body_str)
|
||||||
|
|
||||||
async with aiohttp.ClientSession() as session:
|
async with aiohttp.ClientSession() as session:
|
||||||
async with session.post(url, data=body_str, headers={
|
try:
|
||||||
"Authorization": f"WECHATPAY2-SHA256-RSA2048 {auth}",
|
async with session.post(url, data=body_str, headers={
|
||||||
"Content-Type": "application/json"
|
"Authorization": f"WECHATPAY2-SHA256-RSA2048 {auth}",
|
||||||
}) as resp:
|
"Content-Type": "application/json"
|
||||||
ret = await resp.json()
|
}) as resp:
|
||||||
return ret.get("h5_url")
|
ret = await resp.json()
|
||||||
|
return ret.get("h5_url")
|
||||||
|
except EXception as e:
|
||||||
|
exception(f'{e}, {url=}, {body_str=}, {auth=}')
|
||||||
|
raise e
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user