added new config
This commit is contained in:
+3
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user