From 877c87c371b7ef8b6c1e9a3823513a2f544de369 Mon Sep 17 00:00:00 2001 From: babak alizadeh Date: Wed, 10 Apr 2024 21:35:25 +0000 Subject: [PATCH] bug fix in ide payam sms panel --- hesabixCore/src/Service/SMS.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/hesabixCore/src/Service/SMS.php b/hesabixCore/src/Service/SMS.php index acb0f1b..30c3e13 100644 --- a/hesabixCore/src/Service/SMS.php +++ b/hesabixCore/src/Service/SMS.php @@ -43,27 +43,23 @@ class SMS } } - elseif($this->registryMGR->get('sms','plan') == 'idePayam'){ + elseif($this->registryMGR->get('sms','plan') == 'idepayam'){ ini_set("soap.wsdl_cache_enabled", "0"); - $patternID = $this->entityManager->getRepository(Registry::class)->findOneBy([ - 'root'=>'sms', - 'name'=>$bodyID - ]); //create next $pt = []; foreach($params as $param){ - $pt['{' + array_search($param,$params) + '}'] = $param; + $pt['{' . strval(array_search($param,$params)) . '}'] = $param; } $soap = new \SoapClient("http://185.112.33.61/wbs/send.php?wsdl"); - $soap->token = $this->registryMGR->get('sms','username'); + $soap->token = $this->registryMGR->get('sms','token'); $soap->fromNum = $this->registryMGR->get('sms','fromNum'); $soap->toNum = array($to); - $soap->patternID = $patternID->getValueOfKey(); + $soap->patternID = $bodyID; $soap->Content = json_encode($pt,JSON_UNESCAPED_UNICODE); $soap->Type = 0; $array = $soap->SendSMSByPattern($soap->fromNum, $soap->toNum, $soap->Content, $soap->patternID, $soap->Type, $soap->token); - + }