Commit e0cdca17 by Yvon Kerdoncuff

cosmetic

parent 856eb656
......@@ -32,13 +32,14 @@ class PaymentController extends AbstractController
protected $guardHandler;
protected $paymentUtils;
public function __construct(EntityManagerInterface $em,
public function __construct(
EntityManagerInterface $em,
TranslatorInterface $translator,
LoginAuthenticator $authenticator,
GuardAuthenticatorHandler $guardHandler,
Payum $payum,
PaymentUtils $paymentUtils)
{
PaymentUtils $paymentUtils
) {
$this->em = $em;
$this->translator = $translator;
$this->payum = $payum;
......@@ -55,7 +56,8 @@ class PaymentController extends AbstractController
// Enregistre les données du Flux en json, pour l'enregistrer une fois le paiement validé
$serializer = $this->container->get('serializer');
$toSerialize = Payment::TYPE_ADHESION == $type ? $form->get('cotisation')->getData() : $form->getData();
$data = $serializer->normalize($toSerialize,
$data = $serializer->normalize(
$toSerialize,
null,
[AbstractNormalizer::ATTRIBUTES => [
'reference',
......@@ -75,7 +77,8 @@ class PaymentController extends AbstractController
'expediteur' => ['id'],
'destinataire' => ['id'],
'operateur' => ['id'], ],
]);
]
);
$jsondata = $serializer->serialize($data, 'json');
......@@ -325,9 +328,11 @@ class PaymentController extends AbstractController
$this->translator->trans('Cotisation payée !')
);
}
} elseif (GetHumanStatus::STATUS_CANCELED == $payment->getStatus() ||
} elseif (
GetHumanStatus::STATUS_CANCELED == $payment->getStatus() ||
GetHumanStatus::STATUS_EXPIRED == $payment->getStatus() ||
GetHumanStatus::STATUS_FAILED == $payment->getStatus()) {
GetHumanStatus::STATUS_FAILED == $payment->getStatus()
) {
$this->addFlash(
'error',
$this->translator->trans('La transaction a été annulée.')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment