:art: Add marketcode iv

huangqimin001 vor 3 Jahren
Ursprung
Commit
3f783afcfc
2 geänderte Dateien mit 6 neuen Zeilen und 2 gelöschten Zeilen
  1. 4 1
      kodo/settings.py
  2. 2 1
      pre/market_code.py

+ 4 - 1
kodo/settings.py

@@ -220,7 +220,10 @@ WECHAT = {
220 220
         'mch_key': '',
221 221
         'redpack': {
222 222
 
223
-        }
223
+        },
224
+        'marketcode': {
225
+            'iv': '',
226
+        },
224 227
     },
225 228
 }
226 229
 

+ 2 - 1
pre/market_code.py

@@ -11,11 +11,12 @@ from utils.redis.connect import r
11 11
 WECHAT = settings.WECHAT
12 12
 
13 13
 
14
-def marketcodedownload(application_id, code_start, code_end, isv_application_id='', iv=''):
14
+def marketcodedownload(application_id, code_start, code_end, isv_application_id=''):
15 15
     wxcfg = WECHAT.get('JSAPI', {})
16 16
 
17 17
     appid = wxcfg.get('appID')
18 18
     secret = wxcfg.get('appsecret')
19
+    iv = wxcfg.get('marketcode', {}).get('iv')
19 20
 
20 21
     codes = applycodedownload(application_id=application_id, code_start=code_start, code_end=code_end, appid=appid, secret=secret, token=None, storage=RedisStorage(r), iv=iv)
21 22