From b69052123a3ca1963fd22bf53aef94d6db9600fb Mon Sep 17 00:00:00 2001 From: VivianDee <115420678+VivianDee@users.noreply.github.com> Date: Fri, 14 Nov 2025 10:18:26 +0100 Subject: [PATCH] [fix]: SMS destination --- app/integrations/simbrella.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/integrations/simbrella.py b/app/integrations/simbrella.py index 9376b48..d3dc891 100644 --- a/app/integrations/simbrella.py +++ b/app/integrations/simbrella.py @@ -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 } -- 2.34.1