Added routes

This commit is contained in:
CHIEFSOFT\ameye
2025-04-12 23:25:22 -04:00
parent af7d2099b9
commit 31a8606679
4 changed files with 46 additions and 26 deletions
+19 -20
View File
@@ -16,12 +16,22 @@ class SimbrellaClient:
logger.info(f"BANK_CALL_BASE_URL = {BANK_CALL_BASE_URL}")
logger.info(f"Calling disbursement endpoint with data: {data}")
data1 ={
"requestId": "7876786",
"transactionId": "T001",
data={
"requestId": "RQID1743987402764",
"transactionId": "24",
"customerId": "CN437703",
"accountId": "ACN2167485",
"msisdn": "3451342",
"resultCode": "00",
"resultDescription": "Successful"
}
disbursement_data ={
"requestId": data['requestId'],
"transactionId": data['transactionId'],
"debtId": "273194670",
"customerId": "CN621868",
"accountId": "2017821799",
"customerId": data['customerId'],
"accountId": data['accountId'],
"productId": "101",
"provideAmount": 100000,
"collectAmountInterest": 5000,
@@ -29,24 +39,13 @@ class SimbrellaClient:
"collectAmountInsurance": 1000,
"collectAmountVAT": 75,
"countryId": "01",
"comment": "Testing LoanRequest"
"comment": "Loan Disbursement",
}
try:
# response = requests.post(
# api_url,
# json=data1,
# headers=get_headers()
# )
# headers = {
# 'Content-Type': 'application/json',
# 'x-api_key': f'{settings.VALID_API_KEY}',
# 'App-Id': f'{settings.VALID_APP_ID}'
# }
#
response = requests.post(api_url, json=data1, timeout=10, headers=get_headers())
logger.info(f"Here is your Disbursement Request data ****** : {disbursement_data}")
response = requests.post(api_url, json=disbursement_data, timeout=10, headers=get_headers())
logger.info(f"Disbursement response: {response.json()}")
logger.info(f"Here is your disbursement data: {data1}")
except Exception as e:
logger.info(f"Failed to call disbursement endpoint: {e}")
#raise