Changeset 9745 for main/waeup.uniben/trunk/src/waeup/uniben/interswitch
- Timestamp:
- 30 Nov 2012, 18:16:40 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser.py
r9742 r9745 66 66 } 67 67 h.request('POST', URL, body=xml,headers=headers) 68 r = h.getresponse() 69 d = r.read() 70 if r.status!=200: 71 raise ValueError('Error connecting: %s, %s' % (r.status, r.reason)) 72 return d 68 response = h.getresponse() 69 return response 73 70 74 71 def get_SOAP_response(product_id, transref): … … 83 80 </soap:Body> 84 81 </soap:Envelope>""" % (product_id, transref) 85 result_xml=SOAP_post("http://tempuri.org/getTransactionData",xml) 82 response=SOAP_post("http://tempuri.org/getTransactionData",xml) 83 if response.status!=200: 84 return 'Connection error (%s, %s)' % (response.status, response.reason) 85 result_xml = response.read() 86 86 doc=parseString(result_xml) 87 87 response=doc.getElementsByTagName('getTransactionDataResult')[0].firstChild.data … … 90 90 def query_interswitch(payment): 91 91 sr = get_SOAP_response(PRODUCT_ID, payment.p_id) 92 if sr.startswith('Connection error'): 93 msg = _('Connection error') 94 log = sr 95 return False, msg, log 92 96 wlist = sr.split(':') 93 97 if len(wlist) != 7:
Note: See TracChangeset for help on using the changeset viewer.