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
2cf03643
Commit
2cf03643
authored
Jul 05, 2019
by
Cristian Mauricio Diaz Canales
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rollback
parent
5af0d13b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
23 deletions
+4
-23
src/BackendBundle/Controller/EnvioSmsController.php
src/BackendBundle/Controller/EnvioSmsController.php
+4
-23
No files found.
src/BackendBundle/Controller/EnvioSmsController.php
View file @
2cf03643
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
namespace
BackendBundle\Controller
;
namespace
BackendBundle\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
Symfony\Component\HttpFoundation\Response
;
...
@@ -15,7 +14,7 @@ require_once __DIR__ . '/../../../vendor/autoload.php';
...
@@ -15,7 +14,7 @@ require_once __DIR__ . '/../../../vendor/autoload.php';
use
FOS\RestBundle\View\View
;
use
FOS\RestBundle\View\View
;
use
Sensio\Bundle\FrameworkExtraBundle\Configuration\Method
;
use
Sensio\Bundle\FrameworkExtraBundle\Configuration\Method
;
class
EnvioSmsController
extends
Controller
{
class
EnvioSmsController
extends
FOSRest
Controller
{
/**
/**
* @Route("/usuario/{id}", requirements={"id" = "\d+"}, defaults={"id" = 1})
* @Route("/usuario/{id}", requirements={"id" = "\d+"}, defaults={"id" = 1})
...
@@ -52,24 +51,17 @@ class EnvioSmsController extends Controller {
...
@@ -52,24 +51,17 @@ 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'
);
$resp
=
$this
->
enviarMensaje
(
$campana
,
$telefono
,
$mensaje
,
$usuario
,
$password
,
$url
);
return
$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'
);
$resp
=
$this
->
enviarMensaje
(
$campana
,
$telefono
,
$mensaje
,
$usuario
,
$password
,
$url
);
return
$this
->
enviarMensaje
(
$campana
,
$telefono
,
$mensaje
,
$usuario
,
$password
,
$url
);
}
else
{
//Amazon
}
else
{
//Amazon
$resp
=
$this
->
enviarMensajeAmazon
(
$telefono
,
$mensaje
);
return
$this
->
enviarMensajeAmazon
(
$telefono
,
$mensaje
);
}
}
}
}
$response
=
new
Response
(
$resp
,
Response
::
HTTP_OK
,
[
'content-type'
=>
'application/json'
]
);
return
$response
;
}
}
private
function
enviarMensaje
(
$campana
,
$movil
,
$mensaje
,
$usuario
,
$password
,
$url
)
{
private
function
enviarMensaje
(
$campana
,
$movil
,
$mensaje
,
$usuario
,
$password
,
$url
)
{
...
@@ -219,15 +211,4 @@ class EnvioSmsController extends Controller {
...
@@ -219,15 +211,4 @@ class EnvioSmsController extends Controller {
$notifica
->
save
();
$notifica
->
save
();
}
}
public
function
testAction
(){
$response
=
new
Response
(
'Prueba'
,
Response
::
HTTP_OK
,
[
'content-type'
=>
'application/json'
]
);
return
$response
;
}
}
}
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