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)
|
||||
|
||||
async with aiohttp.ClientSession() as session:
|
||||
async with session.post(url, data=body_str, headers={
|
||||
"Authorization": f"WECHATPAY2-SHA256-RSA2048 {auth}",
|
||||
"Content-Type": "application/json"
|
||||
}) as resp:
|
||||
ret = await resp.json()
|
||||
return ret.get("h5_url")
|
||||
|
||||
try:
|
||||
async with session.post(url, data=body_str, headers={
|
||||
"Authorization": f"WECHATPAY2-SHA256-RSA2048 {auth}",
|
||||
"Content-Type": "application/json"
|
||||
}) as resp:
|
||||
ret = await resp.json()
|
||||
return ret.get("h5_url")
|
||||
except EXception as e:
|
||||
exception(f'{e}, {url=}, {body_str=}, {auth=}')
|
||||
raise e
|
||||
return None
|
||||
|
||||
# -----------------------------------------------------
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user