This commit is contained in:
CHIEFSOFT\ameye
2025-03-04 13:36:34 -05:00
parent cdc2fd129f
commit 0d0f801e2c
+14 -1
View File
@@ -538,8 +538,21 @@ def pending_loans():
]
return offer_detail
@app.route('/loan/repay')
@app.route('/loan/repay', methods=["POST"])
def repay_loans():
try:
data = request.json
if not data:
return {
"message": "Please provide pin,loan_id,accountID",
"data": None,
"error": "Bad request"
}, 400
# validate input
bvn = data["bvn"]
accountid = data["accountid"]
loan_id = data["bvn"]
offer_detail = [
{"cid": "425611f2-c692-4404-b93d-76ca7a5ce00", "description": "Total amount to replay N50,000" , "active" : 1 },
{"cid": "425611f2-c692-4404-b93d-76ca7a5ce01", "description": "Total amount to replay N150,000" , "active" : 1 },