Subversion Repositories SmartDukaan

Rev

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

Rev 6162 Rev 6219
Line 115... Line 115...
115
    print spString
115
    print spString
116
    spString = re.sub('<\?.*\?>','',spString)
116
    spString = re.sub('<\?.*\?>','',spString)
117
    spString = "<dom>" + spString + "</dom>"
117
    spString = "<dom>" + spString + "</dom>"
118
    dom = parseString(spString)
118
    dom = parseString(spString)
119
    response = dom.getElementsByTagName('CheckStatusObj')[0]
119
    response = dom.getElementsByTagName('CheckStatusObj')[0]
120
    responseCode = response.getElementsByTagName('ResponseCode')[0].childNodes[0].data
-
 
121
    transStatus = response.getElementsByTagName('transStatus')[0].childNodes[0].data
120
    transStatus = response.getElementsByTagName('transStatus')[0].childNodes[0].data
-
 
121
    try:
-
 
122
        responseCode = response.getElementsByTagName('ResponseCode')[0].childNodes[0].data
122
    responseDescription = response.getElementsByTagName('ResponseDescription')[0].childNodes[0].data
123
        responseDescription = response.getElementsByTagName('ResponseDescription')[0].childNodes[0].data
-
 
124
    except:
-
 
125
        responseCode = ""
-
 
126
        responseDescription = ""
123
    if responseCode == '00' and transStatus == 'S':
127
    if responseCode == '00' and transStatus == 'S':
124
        return True, responseDescription
128
        return True, responseDescription
125
    else:
129
    else:
126
        return False, responseDescription
130
        return False, responseDescription
127
131