bugfix
This commit is contained in:
parent
80df557919
commit
51aaccfe49
@ -3,17 +3,17 @@ import base64
|
|||||||
import json
|
import json
|
||||||
import time
|
import time
|
||||||
import aiohttp
|
import aiohttp
|
||||||
from abc import ABC
|
|
||||||
from typing import Dict, Any
|
from typing import Dict, Any
|
||||||
from cryptography.hazmat.primitives import hashes, serialization
|
from cryptography.hazmat.primitives import hashes, serialization
|
||||||
from cryptography.hazmat.primitives.asymmetric import padding
|
from cryptography.hazmat.primitives.asymmetric import padding
|
||||||
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
|
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
|
||||||
|
from ..core import Gateway
|
||||||
|
|
||||||
|
|
||||||
WECHAT_API_BASE = "https://api.mch.weixin.qq.com"
|
WECHAT_API_BASE = "https://api.mch.weixin.qq.com"
|
||||||
|
|
||||||
|
|
||||||
class WeChatGateway(ABC):
|
class WechatGateway(Gateway):
|
||||||
"""
|
"""
|
||||||
微信支付网关(适配统一 Gateway 接口)
|
微信支付网关(适配统一 Gateway 接口)
|
||||||
"""
|
"""
|
||||||
@ -173,14 +173,7 @@ class WeChatGateway(ABC):
|
|||||||
ret = await resp.json()
|
ret = await resp.json()
|
||||||
return ret.get("h5_url")
|
return ret.get("h5_url")
|
||||||
|
|
||||||
return {
|
return None
|
||||||
"provider": "wechat",
|
|
||||||
"data": {
|
|
||||||
"out_trade_no": body["out_trade_no"],
|
|
||||||
"h5_url": ret.get("h5_url"),
|
|
||||||
"wx_transaction_id": ret.get("transaction_id")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
async def refund(self, payload: Dict[str, Any]) -> Dict[str, Any]:
|
async def refund(self, payload: Dict[str, Any]) -> Dict[str, Any]:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user