1234567891011121314151617181920212223242526 |
- # -*- coding: utf-8 -*-
- # !/usr/bin/env python
- import logging
- from typing import TYPE_CHECKING, Optional
- from library.wechatpayv3 import WechatClientV3
- logger = logging.getLogger(__name__)
- if TYPE_CHECKING:
- from apps.web.core.models import WechatPayApp, WechatChannelApp
- class MyWechatClientV3(WechatClientV3):
- def __init__(self, app):
- # type: (Optional[WechatPayApp, WechatChannelApp])->None
- super(MyWechatClientV3, self).__init__(
- appid = app.appid,
- mchid = app.mchid,
- private_key = app.ssl_key,
- cert_serial_no = app.app_serial_number,
- apiv3_key = app.apikey_v3,
- certificate_str_list = app.platform_certificates)
|