added extra logs #50
+4
-1
@@ -15,11 +15,14 @@ def get_headers():
|
||||
"username": BANK_CALL_BASIC_AUTH_USERNAME,
|
||||
"password": BANK_CALL_BASIC_AUTH_PASSWORD,
|
||||
}
|
||||
logger.info(f"Calling Bank Call Auth endpoint: {url}")
|
||||
logger.info(f"Calling Bank Call Auth endpoint with data: {data}")
|
||||
|
||||
try:
|
||||
response = requests.post(url, data=data, timeout=10)
|
||||
response.raise_for_status() # Raises HTTPError for 4xx/5xx
|
||||
result = response.json()
|
||||
|
||||
logger.info(f"Bank Call Auth Response: {result}")
|
||||
|
||||
# Check if access_token is present
|
||||
@@ -31,7 +34,7 @@ def get_headers():
|
||||
"Content-Type": "application/json",
|
||||
"x-api-key": settings.BANK_CALL_API_KEY,
|
||||
"App-Id": settings.BANK_CALL_APP_ID,
|
||||
"Authorization": result['access_token'] # no Bearer
|
||||
"Authorization": result['access_token']
|
||||
}
|
||||
|
||||
except requests.exceptions.RequestException as e:
|
||||
|
||||
Reference in New Issue
Block a user