done with collect loan

This commit is contained in:
lennyaiko
2025-03-27 12:18:18 +01:00
parent a352449800
commit 0d4643c8df
2 changed files with 74 additions and 0 deletions
+25
View File
@@ -177,3 +177,28 @@ def disbursement():
}
return jsonify(response), 200
@loan_bp.route("/collect-loan", methods=["POST"])
def collect_loan():
data = request.json
api_url = f"{current_app.config['API_BASE_URL']}/CollectLoan"
# response = requests.post(api_url, json=data, headers=get_headers())
# return jsonify(response.json()), response.status_code
response = {
"transactionId": "T002",
"debtId": "273194670",
"customerId": "CN621868",
"accountId": "2017821799",
"productId": "101",
"collectAmount": 60000,
"penalCharge": 0,
"lienAmount": 20000,
"countryId": "01",
"comment": "Testing CollectionLoanRequest",
"resultCode": "00",
"resultDescription": "Loan Collection Successful",
}
return jsonify(response), 200