progress on stuff

This commit is contained in:
lennyaiko
2025-03-27 11:54:31 +01:00
parent 87015cbddb
commit 2f5cb6a8b1
2 changed files with 71 additions and 0 deletions
+30
View File
@@ -117,3 +117,33 @@ def repayment():
}
return jsonify(response), 200
@loan_bp.route("/rac-check", methods=["POST"])
def rac_check():
data = request.json
api_url = f"{current_app.config['API_BASE_URL']}/RACCheck"
# response = requests.post(api_url, json=data, headers=get_headers())
# return jsonify(response.json()), response.status_code
response = {
"transactionId": "T001",
"customerId": "CN621868",
"accountId": "2017821799",
"RACResponse": {
"Salary account": "1",
"BVN": "1",
"BVNAttachedToAccount": "1",
"CRMS": "1",
"CRC": "1",
"AccountStatus": "1",
"Lien": "1",
"NoBouncedCheck": "1",
"Whitelist": "1",
"NoPastDueSalaryLoan": "1",
"NoPastDueOtherLoan": "1",
},
"resultDescription": "RAC Check Successful",
}
return jsonify(response), 200
+41
View File
@@ -212,3 +212,44 @@ paths:
responses:
200:
description: A successful response
/loans/raccheck:
post:
summary: Performs RAC check on a user
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
transactionId:
type: string
example: "T001"
fbnTransactionId:
type: string
example: "Tr201712RK9232P115"
customerId:
type: string
example: "CN621868"
accountId:
type: string
example: "2017821799"
RAC_Array:
type: array
items:
type: string
example:
- "SalaryAccount"
- "BVN"
- "BVNAttachedtoAccount"
- "CRC"
- "CRMS"
- "AccountStatus"
- "Lien"
- "NoBouncedCheck"
- "Whitelist"
- "NoPastDueSalaryLoan"
- "NoPastDueOtherLoan"
responses:
200:
description: A successful response