1 Commits

Author SHA1 Message Date
VivianDee 70876a48e2 Update autocall.py 2025-11-11 07:06:01 +01:00
+11 -2
View File
@@ -1,3 +1,4 @@
from threading import Thread
from flask import Blueprint, request, jsonify, current_app
import requests
from app.extensions import db
@@ -194,8 +195,16 @@ def direct_loan():
"productId": str(loan_data.get('productId', "")),
"provideAmount": loan_data.get('currentLoanAmount'),
}
response = SimbrellaClient.disburse_loan(data_to_process)
return response
logger.info(f"Starting disbursement thread for {data_to_process['transactionId']}")
thread = Thread(target=SimbrellaClient.disburse_loan, args=(data_to_process,))
thread.start()
return jsonify({
"status": "success",
"message": f"Loan disbursement has been queued for processing."
}), 200
@autocall_bp.route("/direct/repayment", methods=["POST"])
def direct_repayment():