Subversion Repositories SmartDukaan

Rev

Rev 21994 | Rev 23120 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 21994 Rev 22387
Line 6... Line 6...
6
import time
6
import time
7
from shop2020.config.client.ConfigClient import ConfigClient
7
from shop2020.config.client.ConfigClient import ConfigClient
8
from decimal import Decimal
8
from decimal import Decimal
9
from shop2020.thriftpy.model.v1.order.ttypes import RechargeMode
9
from shop2020.thriftpy.model.v1.order.ttypes import RechargeMode
10
from suds.cache import NoCache
10
from suds.cache import NoCache
-
 
11
import ssl
-
 
12
from functools import wraps
-
 
13
 
-
 
14
def sslwrap(func):
-
 
15
    @wraps(func)
-
 
16
    def bar(*args, **kw):
-
 
17
        kw['ssl_version'] = ssl.PROTOCOL_TLSv1
-
 
18
        return func(*args, **kw)
-
 
19
    return bar
-
 
20
 
-
 
21
ssl.wrap_socket = sslwrap(ssl.wrap_socket)
-
 
22
 
11
logging.basicConfig(level=logging.INFO)
23
logging.basicConfig(level=logging.INFO)
12
 
24
 
13
username = base64.b64encode('saholic20')
25
username = base64.b64encode('saholic20')
14
password = base64.b64encode('ap2020sh')
26
password = base64.b64encode('ap2020sh')
15
account_url = "file:///recharge-wsdls/AccountApiMcomm.xml"
27
account_url = "file:///recharge-wsdls/AccountApiMcomm.xml"