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