优化工单模块,增加企微模块
This commit is contained in:
30
sg_wechat_enterprise/we_api/pay/base.py
Normal file
30
sg_wechat_enterprise/we_api/pay/base.py
Normal file
@@ -0,0 +1,30 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
|
||||
class BaseWeChatPayAPI(object):
|
||||
""" WeChat Pay API base class """
|
||||
def __init__(self, client=None):
|
||||
self._client = client
|
||||
|
||||
def _get(self, url, **kwargs):
|
||||
if getattr(self, 'API_BASE_URL', None):
|
||||
kwargs['api_base_url'] = self.API_BASE_URL
|
||||
return self._client.get(url, **kwargs)
|
||||
|
||||
def _post(self, url, **kwargs):
|
||||
if getattr(self, 'API_BASE_URL', None):
|
||||
kwargs['api_base_url'] = self.API_BASE_URL
|
||||
return self._client.post(url, **kwargs)
|
||||
|
||||
@property
|
||||
def appid(self):
|
||||
return self._client.appid
|
||||
|
||||
@property
|
||||
def mch_id(self):
|
||||
return self._client.mch_id
|
||||
|
||||
@property
|
||||
def sub_mch_id(self):
|
||||
return self._client.sub_mch_id
|
||||
Reference in New Issue
Block a user