- Timestamp:
- 9 May 2024, 08:28:08 (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/helpers.py
r17730 r17754 321 321 jsonout = response.read() 322 322 parsed_json = json.loads(jsonout) 323 return {'error': parsed_json['error']} 323 errormsg = '' 324 for value in parsed_json['error'].values(): 325 errormsg += "%s. " %(value) 326 return {'error': errormsg} 324 327 if response.status!=200: 325 328 return {'error': 'Connection error (%s, %s)' % (response.status, response.reason)} … … 345 348 def initiate_payment(payment, host, callbackUrl, public_api_key): 346 349 response = get_JSON_response_initialize(payment, host, callbackUrl, public_api_key) 350 if response.get('error', None): 351 return False, response['error'] 347 352 if response['status'] == 200: 348 353 return True, response['data']['authorizationUrl']
Note: See TracChangeset for help on using the changeset viewer.