- Timestamp:
- 4 Aug 2017, 20:40:45 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/remita/helpers.py
r14753 r14769 50 50 "lineItems":lineitems 51 51 } 52 h.request("POST", url, body=json.dumps(data), headers=headers) 52 try: 53 h.request("POST", url, body=json.dumps(data), headers=headers) 54 except: 55 return {'error': 'Socket Error: Connection to Remita gateway refused.'} 53 56 resp = h.getresponse() 54 57 if resp.status!=200: … … 73 76 else: 74 77 h = httplib.HTTPConnection(host) 75 h.request("GET", url, headers=headers) 78 try: 79 h.request("GET", url, headers=headers) 80 except: 81 return {'error': 'Socket Error: Connection to Remita gateway refused.'} 76 82 resp = h.getresponse() 77 83 if resp.status!=200:
Note: See TracChangeset for help on using the changeset viewer.