Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smsManager
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Cristian Mauricio Diaz Canales
smsManager
Commits
df054540
Commit
df054540
authored
Jul 05, 2019
by
Cristian Mauricio Diaz Canales
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mejora codigo smsgateway.
se añade llamado de parametro configuracion
parent
f8d66188
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
src/BackendBundle/Controller/EnvioSmsController.php
src/BackendBundle/Controller/EnvioSmsController.php
+13
-4
No files found.
src/BackendBundle/Controller/EnvioSmsController.php
View file @
df054540
...
@@ -5,6 +5,7 @@ namespace BackendBundle\Controller;
...
@@ -5,6 +5,7 @@ namespace BackendBundle\Controller;
use
Symfony\Bundle\FrameworkBundle\Controller\Controller
;
use
Symfony\Bundle\FrameworkBundle\Controller\Controller
;
use
FOS\RestBundle\Controller\FOSRestController
;
use
FOS\RestBundle\Controller\FOSRestController
;
use
AppBundle\Lib\Utiles
;
use
AppBundle\Lib\Utiles
;
use
Symfony\Component\HttpFoundation\Response
;
use
Sensio\Bundle\FrameworkExtraBundle\Configuration\Route
;
use
Sensio\Bundle\FrameworkExtraBundle\Configuration\Route
;
use
AppBundle\Model\NotificaQuery
;
use
AppBundle\Model\NotificaQuery
;
use
AppBundle\Model\Notifica
;
use
AppBundle\Model\Notifica
;
...
@@ -51,17 +52,25 @@ class EnvioSmsController extends Controller {
...
@@ -51,17 +52,25 @@ class EnvioSmsController extends Controller {
$usuario
=
Utiles
::
getParametroConfiguracion
(
'nrsgateway_user'
);
$usuario
=
Utiles
::
getParametroConfiguracion
(
'nrsgateway_user'
);
$password
=
Utiles
::
getParametroConfiguracion
(
'nrsgateway_pws'
);
$password
=
Utiles
::
getParametroConfiguracion
(
'nrsgateway_pws'
);
$url
=
Utiles
::
getParametroConfiguracion
(
'nrsgateway_url'
);
$url
=
Utiles
::
getParametroConfiguracion
(
'nrsgateway_url'
);
return
$this
->
enviarMensaje
(
$campana
,
$telefono
,
$mensaje
,
$usuario
,
$password
,
$url
);
$resp
=
$this
->
enviarMensaje
(
$campana
,
$telefono
,
$mensaje
,
$usuario
,
$password
,
$url
);
}
else
{
//teltech
}
else
{
//teltech
if
(
$idmetodo
==
2
)
{
if
(
$idmetodo
==
2
)
{
$usuario
=
Utiles
::
getParametroConfiguracion
(
'teltech_user'
);
$usuario
=
Utiles
::
getParametroConfiguracion
(
'teltech_user'
);
$password
=
Utiles
::
getParametroConfiguracion
(
'teltech_pws'
);
$password
=
Utiles
::
getParametroConfiguracion
(
'teltech_pws'
);
$url
=
Utiles
::
getParametroConfiguracion
(
'teltech_url'
);
$url
=
Utiles
::
getParametroConfiguracion
(
'teltech_url'
);
return
$this
->
enviarMensaje
(
$campana
,
$telefono
,
$mensaje
,
$usuario
,
$password
,
$url
);
$resp
=
$this
->
enviarMensaje
(
$campana
,
$telefono
,
$mensaje
,
$usuario
,
$password
,
$url
);
}
else
{
//Amazon
}
else
{
//Amazon
return
$this
->
enviarMensajeAmazon
(
$telefono
,
$mensaje
);
$resp
=
$this
->
enviarMensajeAmazon
(
$telefono
,
$mensaje
);
}
}
}
}
$response
=
new
Response
(
$resp
,
Response
::
HTTP_OK
,
[
'content-type'
=>
'text/html'
]
);
return
$response
;
}
}
private
function
enviarMensaje
(
$campana
,
$movil
,
$mensaje
,
$usuario
,
$password
,
$url
)
{
private
function
enviarMensaje
(
$campana
,
$movil
,
$mensaje
,
$usuario
,
$password
,
$url
)
{
...
@@ -70,7 +79,7 @@ class EnvioSmsController extends Controller {
...
@@ -70,7 +79,7 @@ class EnvioSmsController extends Controller {
$post
[
'to'
]
=
array
(
$movil
);
$post
[
'to'
]
=
array
(
$movil
);
$post
[
'text'
]
=
$mensaje
;
$post
[
'text'
]
=
$mensaje
;
$post
[
'from'
]
=
$movil
;
$post
[
'from'
]
=
$movil
;
$post
[
'dlr-url'
]
=
Utiles
::
getParametroConfiguracion
(
"url_base"
)
.
"/apirestsms/notifica/"
.
$campana
.
"/%P/%d"
;
$post
[
'dlr-url'
]
=
Utiles
::
getParametroConfiguracion
(
"url_base"
)
.
"/apirestsms/notifica/"
.
$campana
.
"/%P/%d"
;
$user
=
$usuario
;
$user
=
$usuario
;
$password
=
$password
;
$password
=
$password
;
$ch
=
curl_init
();
$ch
=
curl_init
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment