Subversion Repositories SmartDukaan

Rev

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

Rev 9345 Rev 11488
Line 194... Line 194...
194
    dom = parseString(spString)
194
    dom = parseString(spString)
195
    try:
195
    try:
196
        transactions = dom.getElementsByTagName('TransactionHistoryPojo')
196
        transactions = dom.getElementsByTagName('TransactionHistoryPojo')
197
    except:
197
    except:
198
        pass
198
        pass
199
    return transactions
-
 
200
199
    return transactions
-
 
200
 
-
 
201
def getRechargeStatus(spiceTID='', merchantTxnId=''):
-
 
202
    spString = getRechargeClient().service.getCheckStatus(username,password,spiceTID,merchantTxnId)
-
 
203
    print spString
-
 
204
    spString = re.sub('<\?.*\?>','',spString)
-
 
205
    spString = "<dom>" + spString + "</dom>"
-
 
206
    dom = parseString(spString)
-
 
207
    response = dom.getElementsByTagName('CheckStatusObj')[0]
-
 
208
    transStatus = response.getElementsByTagName('transStatus')[0].childNodes[0].data
-
 
209
    responseCode = response.getElementsByTagName('ResponseCode')[0].childNodes[0].data
-
 
210
    try:
-
 
211
        responseDescription = response.getElementsByTagName('ResponseDescription')[0].childNodes[0].data
-
 
212
    except:
-
 
213
        responseDescription = ""
-
 
214
    return responseCode, responseDescription
-
 
215