Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
musica_listas_umusic
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
musica_listas_umusic
Commits
34e1925d
Commit
34e1925d
authored
Oct 01, 2019
by
Cristian Mauricio Diaz Canales
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Actualizacion json input-guardado de respuesta en bd
parent
9e05e896
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
2 deletions
+45
-2
src/FrontendBundle/Controller/PagosController.php
src/FrontendBundle/Controller/PagosController.php
+45
-2
No files found.
src/FrontendBundle/Controller/PagosController.php
View file @
34e1925d
...
...
@@ -94,10 +94,53 @@ class PagosController extends AbstractController {
$kushkiSuscripcion
->
setSubscriptionStartDate
(
$suscripcion
->
getSusStartDateKushki
());
$result
=
$kushkiSuscripcion
->
callSuscripcionKushki
(
$em
);
$log
->
debug
(
print_r
(
$result
,
true
));
$log
->
debug
(
"analizando respuesta KUSHKI- SUSCRIPCION....."
);
$http_status
=
$result
[
"code"
];
$message
=
$result
[
"message"
];
$internalId
=
$result
[
"internalId"
];
$subscriptionId
=
$result
[
"subscriptionId"
];
$error
=
0
;
if
(
$http_status
>
201
){
$log
->
debug
(
"ha ocurrido un error con la suscripcion KUSHKI- SUSCRIPCION....."
);
$error
=
1
;
$metodoPago
->
setUpdatedAt
(
new
\DateTime
());
$em
->
persist
(
$metodoPago
);
$em
->
flush
();
$suscripcion
->
setSusHttpCodeKushki
(
$http_status
);
$suscripcion
->
setSusResponseKushki
(
json_encode
(
$result
));
$suscripcion
->
setSusTransactionIdKushki
(
$internalId
);
$suscripcion
->
setUpdatedAt
(
new
\DateTime
());
$em
->
persist
(
$suscripcion
);
$em
->
flush
();
}
else
{
$log
->
debug
(
"la suscripcion se ha realizado correctamente KUSHKI- SUSCRIPCION....."
);
$metodoPago
->
setMpaTipo
(
PluMetodoPago
::
TIPO_VIGENTE
);
$metodoPago
->
setMpaEstadoPago
(
PluMetodoPago
::
ESTADO_PAGO_OK
);
$metodoPago
->
setMpaEstado
(
PluMetodoPago
::
ESTADO_VALIDO
);
$metodoPago
->
setUpdatedAt
(
new
\DateTime
());
$em
->
persist
(
$metodoPago
);
$em
->
flush
();
$suscripcion
->
setSusVigente
(
PluSuscripcion
::
VIGENTE
);
$suscripcion
->
setSusHttpCodeKushki
(
$http_status
);
$suscripcion
->
setSusResponseKushki
(
json_encode
(
$result
));
$suscripcion
->
setSusTransactionIdKushki
(
$internalId
);
$suscripcion
->
setSusSuscriptionIdKushki
(
$subscriptionId
);
$suscripcion
->
setUpdatedAt
(
new
\DateTime
());
$em
->
persist
(
$suscripcion
);
$em
->
flush
();
}
return
$this
->
render
(
'frontend/paginas/confirm.html.twig'
,
[
"listas"
=>
$listas
,
"msisdn"
=>
$userIdentifier
"msisdn"
=>
$userIdentifier
,
"message"
=>
$message
,
"error"
=>
$error
]);
}
...
...
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