added new config

This commit is contained in:
Chinenye Nmoh
2025-10-30 17:17:13 +01:00
parent 6768fa89ba
commit 5c8505f923
4 changed files with 15 additions and 11 deletions
+3 -3
View File
@@ -9,7 +9,7 @@ def get_headers():
BANK_CALL_BASIC_AUTH_PASSWORD = settings.BANK_CALL_BASIC_AUTH_PASSWORD
BANK_GRANT_TYPE = settings.BANK_GRANT_TYPE
#authenticate
url = f"{BANK_CALL_BASE_URL}{BANK_CALL_AUTH_ENDPOINT}"
url = f"{BANK_CALL_BASE_URL}/Auth/generate-token"
data = {
"grant_type": BANK_GRANT_TYPE,
"username": BANK_CALL_BASIC_AUTH_USERNAME,
@@ -41,7 +41,7 @@ def get_headers():
except requests.exceptions.RequestException as e:
logger.error(f"Failed to get auth token: {e}")
return {"error": "Authentication request failed"}
raise
except ValueError as e:
logger.error(f"Failed to parse auth response JSON: {e}")
return {"error": "Invalid authentication response"}
raise