[fix]: sms destination #58
@@ -2,6 +2,7 @@ import requests
|
||||
from app.config import settings
|
||||
from app.helpers.response_helper import ResponseHelper
|
||||
# from app.routes.autocall import verify_transaction
|
||||
from app.models.customer import Customer
|
||||
from app.services.loan import LoanService
|
||||
from app.services.loan_repayment_schedule import LoanRepaymentScheduleService
|
||||
from app.utils.auth import get_headers
|
||||
@@ -281,8 +282,16 @@ class SimbrellaClient:
|
||||
logger.info(f"this is verify result, {result}")
|
||||
LoanService.set_disburse_verify_result(loan_data['debtId'], result.get('responseCode', ''),
|
||||
result.get('responseMessage', ''))
|
||||
|
||||
customer = Customer.get_customer(loan_data.get('customerId'))
|
||||
if customer:
|
||||
misisdn = customer.msisdn
|
||||
else:
|
||||
logger.info(f"Customer does not exist for customer id: {loan_data.get('customerId')}")
|
||||
misisdn = settings.TEST_NO
|
||||
|
||||
sms_data = {
|
||||
"dest": transaction_data.get('phone_number') or settings.TEST_NO,
|
||||
"dest": misisdn,
|
||||
"text": f"Transaction {loan_data.get('transactionId')} verified successfully",
|
||||
"unicode": True
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user