pay loan
This commit is contained in:
+14
-1
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user