This commit is contained in:
yumoqing 2025-12-12 14:46:17 +08:00
parent 0bec8e6e72
commit fee92199fa
3 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
# unipay/notify.py # unipay/notify.py
from typing import Dict from typing import Dict
from .providers.wechat import WechatGateway from .providers.wechat import WechatGateway
from .providers.paypal import PayPalGateway from .providers.paypal import PaypalGateway
from .providers.alipay import AlipayGateway from .providers.alipay import AlipayGateway
from .providers.stripe import StripeGateway from .providers.stripe import StripeGateway
@ -20,7 +20,7 @@ def get_provider(name: str, conf: Dict):
if name == "wechat": if name == "wechat":
return WechatGateway(**conf) return WechatGateway(**conf)
if name == "paypal": if name == "paypal":
return PayPalGateway(**conf) return PaypalGateway(**conf)
if name == "alipay": if name == "alipay":
return AlipayGateway(**conf) return AlipayGateway(**conf)
if name == "stripe": if name == "stripe":

View File

@ -17,7 +17,7 @@ from ..utils import safe_json_dumps
ALIPAY_GATEWAY = "https://openapi.alipay.com/gateway.do" ALIPAY_GATEWAY = "https://openapi.alipay.com/gateway.do"
class AlipayProvider(Gateway): class AlipayGateway(Gateway):
""" """
生产级支付宝接口H5 支付 / 退款 / 查询 / 回调验签 生产级支付宝接口H5 支付 / 退款 / 查询 / 回调验签
""" """

View File

@ -7,7 +7,7 @@ import os
from ..core import Gateway, GatewayError from ..core import Gateway, GatewayError
from ..utils import safe_json_dumps from ..utils import safe_json_dumps
class PayPalGateway(Gateway): class PaypalGateway(Gateway):
def __init__(self, client_id: str, client_secret: str, sandbox: bool = True): def __init__(self, client_id: str, client_secret: str, sandbox: bool = True):
self.client_id = client_id self.client_id = client_id
self.client_secret = client_secret self.client_secret = client_secret