コード例 #1
0
ファイル: we.py プロジェクト: huzhennan/django_wechat_test
 def __init__(self, app_id, app_secret, app_token, store, encrypt_mode='normal'):
     conf = WechatConf(
         appid=app_id,
         appsecret=app_secret,
         token=app_token,
         encrypt_mode=encrypt_mode,
         access_token_getfunc=self.get_access_token_func,
         jsapi_ticket_getfunc=self.get_jsapi_ticket_func,
     )
     WechatBasic.__init__(self, conf=conf)
     self.__app_id = app_id
     self.__app_secret = app_secret
     self.__app_token = app_token
     self.__store = store
コード例 #2
0
ファイル: we3rd.py プロジェクト: huzhennan/django_wechat_test
 def __init__(self, component_app_id, component_app_secret,
              app_token, encoding_aes_key, store, encrypt_mode='safe', client_app_id=None):
     conf = WechatConf(
         appid=component_app_id,
         appsecret=component_app_secret,
         token=app_token,
         encrypt_mode=encrypt_mode,
         encoding_aes_key=encoding_aes_key,
         access_token_getfunc=self.token_get_func
     )
     WechatBasic.__init__(self, conf=conf)
     self.__component_app_id = component_app_id
     self.__component_app_secret = component_app_secret
     self.__store = store
     self.__client_app_id = client_app_id