WechatClientV3.py 745 B

1234567891011121314151617181920212223242526
  1. # -*- coding: utf-8 -*-
  2. # !/usr/bin/env python
  3. import logging
  4. from typing import TYPE_CHECKING, Optional
  5. from library.wechatpayv3 import WechatClientV3
  6. logger = logging.getLogger(__name__)
  7. if TYPE_CHECKING:
  8. from apps.web.core.models import WechatPayApp, WechatChannelApp
  9. class MyWechatClientV3(WechatClientV3):
  10. def __init__(self, app):
  11. # type: (Optional[WechatPayApp, WechatChannelApp])->None
  12. super(MyWechatClientV3, self).__init__(
  13. appid = app.appid,
  14. mchid = app.mchid,
  15. private_key = app.ssl_key,
  16. cert_serial_no = app.app_serial_number,
  17. apiv3_key = app.apikey_v3,
  18. certificate_str_list = app.platform_certificates)