From f5cffd9132a9eaf5ecb249e17a74c0792a3f34b9 Mon Sep 17 00:00:00 2001 From: Leny BERNARD Date: Fri, 23 Sep 2016 17:19:15 +0200 Subject: [PATCH] Move to Troopers organization (#24) * Move to Troopers organization * :shirt: improve code style --- AppVentusMangopayBundle.php | 9 - AppVentusMangopayEvents.php | 52 - Controller/PaymentController.php | 113 +- DependencyInjection/Configuration.php | 10 +- ...sion.php => TroopersMangopayExtension.php} | 22 +- Entity/BankInformationInterface.php | 10 +- Entity/CardPreAuthorisation.php | 160 ++- Entity/Order.php | 51 +- Entity/Transaction.php | 101 +- Entity/TransactionInterface.php | 22 +- Entity/UserInterface.php | 21 +- Event/CardRegistrationEvent.php | 6 +- Event/OrderEvent.php | 5 +- Event/PayInEvent.php | 6 +- Event/PreAuthorisationEvent.php | 13 +- Event/UserEvent.php | 12 +- Event/WalletEvent.php | 12 +- Exception/MongopayExceptionInterface.php | 7 +- Exception/MongopayPayInCreationException.php | 3 +- Form/CardType.php | 113 +- Helper/BankInformationHelper.php | 22 +- Helper/BankwireHelper.php | 25 +- Helper/MangopayHelper.php | 9 +- Helper/PaymentDirectHelper.php | 19 +- Helper/PaymentHelper.php | 112 +- Helper/UserHelper.php | 19 +- Helper/WalletHelper.php | 24 +- LICENSE.md | 2 +- OrderEvents.php | 5 +- README.md | 31 +- Resources/config/services.yml | 74 +- Resources/js/mangopay.js | 8 +- Resources/views/cardPayment.html.twig | 22 +- Tests/Controller/DefaultControllerTest.php | 17 - TroopersMangopayBundle.php | 9 + TroopersMangopayEvents.php | 51 + composer.json | 19 +- composer.lock | 1160 ----------------- 38 files changed, 598 insertions(+), 1778 deletions(-) delete mode 100644 AppVentusMangopayBundle.php delete mode 100644 AppVentusMangopayEvents.php rename DependencyInjection/{AppVentusMangopayExtension.php => TroopersMangopayExtension.php} (58%) delete mode 100644 Tests/Controller/DefaultControllerTest.php create mode 100644 TroopersMangopayBundle.php create mode 100644 TroopersMangopayEvents.php delete mode 100644 composer.lock diff --git a/AppVentusMangopayBundle.php b/AppVentusMangopayBundle.php deleted file mode 100644 index 94f73d7..0000000 --- a/AppVentusMangopayBundle.php +++ /dev/null @@ -1,9 +0,0 @@ -getDoctrine()->getManager() - ->getRepository($this->container->getParameter('appventus_mangopay.order.class')); + ->getRepository($this->container->getParameter('troopers_mangopay.order.class')); $order = $orderRepository->findOneById($order); if (!$order instanceof Order) { throw $this->createNotFoundException('Order not found'); @@ -42,61 +41,59 @@ public function newAction(Request $request, $order) if ($form->isValid()) { //find or create a mango user - $mangoUser = $this->container->get('appventus_mangopay.user_helper') + $mangoUser = $this->container->get('troopers_mangopay.user_helper') ->findOrCreateMangoUser($this->getUser()); //create a cardRegistration - $callback = $this->container->get('appventus_mangopay.payment_helper') + $callback = $this->container->get('troopers_mangopay.payment_helper') ->prepareCardRegistrationCallback($mangoUser, $order); //return js callback return new JsonResponse($callback); } return $this->render( - 'AppVentusMangopayBundle::cardPayment.html.twig', - array( - 'form' => $form->createView(), + 'TroopersMangopayBundle::cardPayment.html.twig', + [ + 'form' => $form->createView(), 'order' => $order, - ) + ] ); } /** * @param Request $request The request * @param Reservation $reservation The reservation - * @param integer $cardId The cardId + * @param int $cardId The cardId * * This method is called by paymentAction callback, with the authorized cardId as argument. * It creates a PreAuthorisation with reservation price, and store its id in the Reservation. * When the owner will accept the reservation, we will be able to fetch the PreAuthorisation and create the PayIn * - * @Route("/finalize/{orderId}/{cardId}", name="appventus_mangopaybundle_payment_finalize") + * @Route("/finalize/{orderId}/{cardId}", name="troopers_mangopaybundle_payment_finalize") + * * @return JsonResponse return json */ public function paymentFinalizeAction(Request $request, $orderId, $cardId) { - $em = $this->getDoctrine()->getManager(); - $orderRepository = $em->getRepository($this->container->getParameter('appventus_mangopay.order.class')); + $orderRepository = $em->getRepository($this->container->getParameter('troopers_mangopay.order.class')); $order = $orderRepository->findOneById($orderId); $data = $request->get('data'); $errorCode = $request->get('errorCode'); - $paymentHelper = $this->container->get('appventus_mangopay.payment_helper'); + $paymentHelper = $this->container->get('troopers_mangopay.payment_helper'); $updatedCardRegister = $paymentHelper->updateCardRegistration($cardId, $data, $errorCode); // Handle error if ((property_exists($updatedCardRegister, 'ResultCode') - && $updatedCardRegister->ResultCode !== "000000") - || $updatedCardRegister->Status == 'ERROR') - { - - $errorMessage = $this->get('translator')->trans('mangopay.error.' . $updatedCardRegister->ResultCode); + && $updatedCardRegister->ResultCode !== '000000') + || $updatedCardRegister->Status == 'ERROR') { + $errorMessage = $this->get('translator')->trans('mangopay.error.'.$updatedCardRegister->ResultCode); - return new JsonResponse(array( + return new JsonResponse([ 'success' => false, - 'message' => $errorMessage - )); + 'message' => $errorMessage, + ]); } // Create a PayIn @@ -104,25 +101,24 @@ public function paymentFinalizeAction(Request $request, $orderId, $cardId) // Handle error if ((property_exists($preAuth, 'Code') && $preAuth->Code !== 200) || $preAuth->Status == 'FAILED') { + $errorMessage = $this->get('translator')->trans('mangopay.error.'.$preAuth->ResultCode); - $errorMessage = $this->get('translator')->trans('mangopay.error.' . $preAuth->ResultCode); - - return new JsonResponse(array( + return new JsonResponse([ 'success' => false, - 'message' => $errorMessage - )); + 'message' => $errorMessage, + ]); } // Handle secure mode if (property_exists($preAuth, 'SecureModeNeeded') && $preAuth->SecureModeNeeded == 1) { - return new JsonResponse(array( - 'success' => true, - 'redirect' => $preAuth->SecureModeRedirectURL - )); + return new JsonResponse([ + 'success' => true, + 'redirect' => $preAuth->SecureModeRedirectURL, + ]); } // store payin transaction $event = new PreAuthorisationEvent($order, $preAuth); - $this->get('event_dispatcher')->dispatch(AppVentusMangopayEvents::UPDATE_CARD_PREAUTHORISATION, $event); + $this->get('event_dispatcher')->dispatch(TroopersMangopayEvents::UPDATE_CARD_PREAUTHORISATION, $event); $event = new OrderEvent($order); $this->get('event_dispatcher')->dispatch(OrderEvents::ORDER_CREATED, $event); @@ -135,13 +131,12 @@ public function paymentFinalizeAction(Request $request, $orderId, $cardId) $this->get('session')->getFlashBag()->add( 'success', - $this->get('translator')->trans('appventus_mangopay.alert.pre_authorisation.success') + $this->get('translator')->trans('troopers_mangopay.alert.pre_authorisation.success') ); - return new JsonResponse(array( - 'success' => true - )); - + return new JsonResponse([ + 'success' => true, + ]); } /** @@ -150,27 +145,26 @@ public function paymentFinalizeAction(Request $request, $orderId, $cardId) * * This method is called by paymentFinalizeActionif 3dsecure is required. 3DSecure is needed when 250€ are reached * - * @Route("/finalize-secure/{orderId}", name="appventus_mangopaybundle_payment_finalize_secure") + * @Route("/finalize-secure/{orderId}", name="troopers_mangopaybundle_payment_finalize_secure") + * * @return RedirectResponse */ public function paymentFinalizeSecureAction(Request $request, $orderId) { - $em = $this->getDoctrine()->getManager(); - $orderRepository = $em->getRepository($this->container->getParameter('appventus_mangopay.order.class')); + $orderRepository = $em->getRepository($this->container->getParameter('troopers_mangopay.order.class')); $order = $orderRepository->findOneById($orderId); - $mangopayApi = $this->container->get('appventus_mangopay.mango_api'); + $mangopayApi = $this->container->get('troopers_mangopay.mango_api'); $preAuthId = $request->get('preAuthorizationId'); $preAuth = $mangopayApi->CardPreAuthorizations->Get($preAuthId); if ((property_exists($preAuth, 'Code') && $preAuth->Code !== 200) || $preAuth->Status != 'SUCCEEDED') { - if (property_exists($preAuth, 'Code')) { $this->get('session')->getFlashBag()->add( 'danger', - $this->get('translator')->trans('mangopay.error.' . $preAuth->Code) + $this->get('translator')->trans('mangopay.error.'.$preAuth->Code) ); } else { $this->get('session')->getFlashBag()->add('error', $preAuth->ResultMessage); @@ -184,7 +178,7 @@ public function paymentFinalizeSecureAction(Request $request, $orderId) } $event = new PreAuthorisationEvent($order, $preAuth); - $this->get('event_dispatcher')->dispatch(AppVentusMangopayEvents::UPDATE_CARD_PREAUTHORISATION, $event); + $this->get('event_dispatcher')->dispatch(TroopersMangopayEvents::UPDATE_CARD_PREAUTHORISATION, $event); $event = new OrderEvent($order); $this->get('event_dispatcher')->dispatch(OrderEvents::ORDER_CREATED, $event); @@ -196,10 +190,10 @@ public function paymentFinalizeSecureAction(Request $request, $orderId) $this->get('session')->getFlashBag()->add( 'success', - $this->get('translator')->trans('appventus_mangopay.alert.pre_authorisation.success') + $this->get('translator')->trans('troopers_mangopay.alert.pre_authorisation.success') ); - return $this->redirect($this->get('appventus_mangopay.payment_helper')->generateSuccessUrl()); + return $this->redirect($this->get('troopers_mangopay.payment_helper')->generateSuccessUrl()); } /** @@ -207,13 +201,14 @@ public function paymentFinalizeSecureAction(Request $request, $orderId) * * This method shows the congratulations * - * @Route("/success", name="appventus_mangopaybundle_payment_success") + * @Route("/success", name="troopers_mangopaybundle_payment_success") + * * @return Response */ public function successAction(Request $request) { return $this->render( - 'AppVentusMangopayBundle::success.html.twig' + 'TroopersMangopayBundle::success.html.twig' ); } } diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index ed91699..72f6064 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -1,25 +1,25 @@ root('appventus_mangopay'); - + $rootNode = $treeBuilder->root('troopers_mangopay'); + $rootNode ->children() ->booleanNode('debug_mode')->defaultValue(false)->end() diff --git a/DependencyInjection/AppVentusMangopayExtension.php b/DependencyInjection/TroopersMangopayExtension.php similarity index 58% rename from DependencyInjection/AppVentusMangopayExtension.php rename to DependencyInjection/TroopersMangopayExtension.php index c7455af..72f8511 100644 --- a/DependencyInjection/AppVentusMangopayExtension.php +++ b/DependencyInjection/TroopersMangopayExtension.php @@ -1,21 +1,21 @@ load('services.yml'); - - $container->setParameter('appventus_mangopay.debug_mode', $config['debug_mode'] === true); - $container->setParameter('appventus_mangopay.client_id', $config['client_id']); - $container->setParameter('appventus_mangopay.client_password', $config['client_password']); - $container->setParameter('appventus_mangopay.base_url', $config['base_url']); + + $container->setParameter('troopers_mangopay.debug_mode', $config['debug_mode'] === true); + $container->setParameter('troopers_mangopay.client_id', $config['client_id']); + $container->setParameter('troopers_mangopay.client_password', $config['client_password']); + $container->setParameter('troopers_mangopay.base_url', $config['base_url']); } } diff --git a/Entity/BankInformationInterface.php b/Entity/BankInformationInterface.php index 0bf2fdd..2150200 100644 --- a/Entity/BankInformationInterface.php +++ b/Entity/BankInformationInterface.php @@ -1,25 +1,25 @@ order = $order; + return $this; } } diff --git a/Event/PayInEvent.php b/Event/PayInEvent.php index fe0d2e9..ffeffa3 100644 --- a/Event/PayInEvent.php +++ b/Event/PayInEvent.php @@ -1,6 +1,6 @@ add('cardNumber', TextType::class, array( - 'constraints' => array(new NotBlank(['groups' => ['card']])), - 'label' => 'appventus_mangopay.card_number.label', - 'attr' => array( - 'data-id' => 'appventus_mangopay_card_number', - 'placeholder' => 'appventus_mangopay.card_number.placeholder', - ), - 'mapped' => false - )) - ->add('cardHolder', TextType::class, array( - 'constraints' => array(new NotBlank(['groups' => ['card']])), - 'label' => 'appventus_mangopay.card_holder.label', - 'attr' => array( - 'data-id' => 'appventus_mangopay_card_holder', - 'placeholder' => 'appventus_mangopay.card_holder.placeholder', - ), - 'mapped' => false - )) - ->add('ccv', IntegerType::class, array( - 'constraints' => array(new NotBlank(['groups' => ['card']])), - 'label' => 'appventus_mangopay.card_ccv.label', - 'attr' => array( - 'data-id' => 'appventus_mangopay_ccv', - 'placeholder' => 'appventus_mangopay.ccv.placeholder', - ), - 'mapped' => false - )) - ->add('cardExpiryMonth', ChoiceType::class, array( - 'constraints' => array(new NotBlank(['groups' => ['card']])), - 'label' => 'appventus_mangopay.card_expiry_month.label', - 'choices' => ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"], + ->add('cardNumber', TextType::class, [ + 'constraints' => [new NotBlank(['groups' => ['card']])], + 'label' => 'troopers_mangopay.card_number.label', + 'attr' => [ + 'data-id' => 'troopers_mangopay_card_number', + 'placeholder' => 'troopers_mangopay.card_number.placeholder', + ], + 'mapped' => false, + ]) + ->add('cardHolder', TextType::class, [ + 'constraints' => [new NotBlank(['groups' => ['card']])], + 'label' => 'troopers_mangopay.card_holder.label', + 'attr' => [ + 'data-id' => 'troopers_mangopay_card_holder', + 'placeholder' => 'troopers_mangopay.card_holder.placeholder', + ], + 'mapped' => false, + ]) + ->add('ccv', IntegerType::class, [ + 'constraints' => [new NotBlank(['groups' => ['card']])], + 'label' => 'troopers_mangopay.card_ccv.label', + 'attr' => [ + 'data-id' => 'troopers_mangopay_ccv', + 'placeholder' => 'troopers_mangopay.ccv.placeholder', + ], + 'mapped' => false, + ]) + ->add('cardExpiryMonth', ChoiceType::class, [ + 'constraints' => [new NotBlank(['groups' => ['card']])], + 'label' => 'troopers_mangopay.card_expiry_month.label', + 'choices' => ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'], 'choices_as_values' => true, - 'attr' => array( - 'data-id' => 'appventus_mangopay_card_expiry_month', - 'placeholder' => 'appventus_mangopay.card_expiry_month.placeholder', - ), - 'mapped' => false - )); + 'attr' => [ + 'data-id' => 'troopers_mangopay_card_expiry_month', + 'placeholder' => 'troopers_mangopay.card_expiry_month.placeholder', + ], + 'mapped' => false, + ]); - $years = array(); - $range = range(date('y'), date('y')+15); - foreach ($range as $year) { - $year = str_pad($year, 2, "0", STR_PAD_LEFT); - $years[$year] = $year; - $year = (int) $year + 1; - } + $years = []; + $range = range(date('y'), date('y') + 15); + foreach ($range as $year) { + $year = str_pad($year, 2, '0', STR_PAD_LEFT); + $years[$year] = $year; + $year = (int) $year + 1; + } - $builder->add('cardExpiryYear', ChoiceType::class, array( - 'constraints' => array(new NotBlank(['groups' => ['card']])), - 'choices' => $years, + $builder->add('cardExpiryYear', ChoiceType::class, [ + 'constraints' => [new NotBlank(['groups' => ['card']])], + 'choices' => $years, 'choices_as_values' => true, - 'attr' => array( - 'data-id' => 'appventus_mangopay_card_expiry_year', - 'placeholder' => 'appventus_mangopay.card_expiry_year.placeholder', - ), - 'mapped' => false - )) + 'attr' => [ + 'data-id' => 'troopers_mangopay_card_expiry_year', + 'placeholder' => 'troopers_mangopay.card_expiry_year.placeholder', + ], + 'mapped' => false, + ]) // - ; +; } /** @@ -86,6 +85,6 @@ public function buildForm(FormBuilderInterface $builder, array $options) */ public function getBlockPrefix() { - return 'appventus_mangopaybundle_card_type'; + return 'troopers_mangopaybundle_card_type'; } } diff --git a/Helper/BankInformationHelper.php b/Helper/BankInformationHelper.php index d4b011a..9752512 100644 --- a/Helper/BankInformationHelper.php +++ b/Helper/BankInformationHelper.php @@ -1,21 +1,14 @@ userHelper->findOrCreateMangoUser($bankInformation->getUser()); //Create mango bank account $bankAccount = new BankAccount(); - $bankAccount->OwnerName = $bankInformation->getUser()->getFullName(); - $bankAccount->UserId = $mangoUser->Id; - $bankAccount->Type = "IBAN"; + $bankAccount->OwnerName = $bankInformation->getUser()->getFullName(); + $bankAccount->UserId = $mangoUser->Id; + $bankAccount->Type = 'IBAN'; $bankAccount->OwnerAddress = $bankInformation->getAddress(); $bankAccountDetailsIban = new BankAccountDetailsIBAN(); @@ -65,5 +58,4 @@ public function createBankAccount(BankInformationInterface $bankInformation) return $bankAccount; } - } diff --git a/Helper/BankwireHelper.php b/Helper/BankwireHelper.php index cc3ef8d..3d763a0 100644 --- a/Helper/BankwireHelper.php +++ b/Helper/BankwireHelper.php @@ -1,30 +1,15 @@ dispatcher = $dispatcher; $this->entityManager = $entityManager; } - - } diff --git a/Helper/PaymentDirectHelper.php b/Helper/PaymentDirectHelper.php index ade4af5..e7b605c 100644 --- a/Helper/PaymentDirectHelper.php +++ b/Helper/PaymentDirectHelper.php @@ -1,16 +1,15 @@ Currency = "EUR"; + $debitedFunds->Currency = 'EUR'; $debitedFunds->Amount = $transaction->getDebitedFunds(); $fees = new Money(); - $fees->Currency = "EUR"; + $fees->Currency = 'EUR'; $fees->Amount = $transaction->getFees(); $payIn = new PayIn(); @@ -47,7 +45,7 @@ public function createDirectTransaction(TransactionInterface $transaction, $exec $payIn->Type = 'PAYIN'; $payIn->PaymentDetails = new \MangoPay\PayInPaymentDetailsCard(); - $payIn->PaymentDetails->CardType = "CB_VISA_MASTERCARD"; + $payIn->PaymentDetails->CardType = 'CB_VISA_MASTERCARD'; //@TODO : Find a better way to send default to this function to set default if (!$executionDetails instanceof \MangoPay\PayInExecutionDetails) { @@ -64,9 +62,8 @@ public function createDirectTransaction(TransactionInterface $transaction, $exec //TODO // $event = new CardRegistrationEvent($cardRegistration); -// $this->dispatcher->dispatch(AppVentusMangopayEvents::NEW_CARD_REGISTRATION, $event); +// $this->dispatcher->dispatch(TroopersMangopayEvents::NEW_CARD_REGISTRATION, $event); return $mangoPayTransaction; } - } diff --git a/Helper/PaymentHelper.php b/Helper/PaymentHelper.php index f2cd8c5..8b5fb16 100644 --- a/Helper/PaymentHelper.php +++ b/Helper/PaymentHelper.php @@ -1,14 +1,7 @@ UserId = $user->Id; - $cardRegistration->Currency = "EUR"; + $cardRegistration->Currency = 'EUR'; $mangoCardRegistration = $this->mangopayHelper->CardRegistrations->create($cardRegistration); $event = new CardRegistrationEvent($cardRegistration); - $this->dispatcher->dispatch(AppVentusMangopayEvents::NEW_CARD_REGISTRATION, $event); + $this->dispatcher->dispatch(TroopersMangopayEvents::NEW_CARD_REGISTRATION, $event); $cardRegistrationURL = $mangoCardRegistration->CardRegistrationURL; $preregistrationData = $mangoCardRegistration->PreregistrationData; $accessKey = $mangoCardRegistration->AccessKey; $redirect = $this->router->generate( - 'appventus_mangopaybundle_payment_finalize', - array( + 'troopers_mangopaybundle_payment_finalize', + [ 'orderId' => $order->getId(), - 'cardId' => $mangoCardRegistration->Id - ) + 'cardId' => $mangoCardRegistration->Id, + ] ); $successRedirect = $this->generateSuccessUrl(); - return array( + return [ 'callback' => 'payAjaxOrRedirect("' - . $redirect . '", "' - . $redirect . '", "' - . $cardRegistrationURL . '", "' - . $preregistrationData . '", "' - . $accessKey . '", "' - . $successRedirect . '")', - ); + .$redirect.'", "' + .$redirect.'", "' + .$cardRegistrationURL.'", "' + .$preregistrationData.'", "' + .$accessKey.'", "' + .$successRedirect.'")', + ]; } /** - * Update card registration with token - * @param string $cardId - * @param string $data - * @param string $errorCode + * Update card registration with token. + * + * @param string $cardId + * @param string $data + * @param string $errorCode + * * @return CardRegistration */ public function updateCardRegistration($cardId, $data, $errorCode) { - $cardRegister = $this->mangopayHelper->CardRegistrations->Get($cardId); - $cardRegister->RegistrationData = $data ? "data=" . $data : "errorCode=" . $errorCode; + $cardRegister->RegistrationData = $data ? 'data='.$data : 'errorCode='.$errorCode; $updatedCardRegister = $this->mangopayHelper->CardRegistrations->Update($cardRegister); $event = new CardRegistrationEvent($updatedCardRegister); - $this->dispatcher->dispatch(AppVentusMangopayEvents::UPDATE_CARD_REGISTRATION, $event); + $this->dispatcher->dispatch(TroopersMangopayEvents::UPDATE_CARD_REGISTRATION, $event); return $updatedCardRegister; } @@ -104,16 +103,16 @@ public function createPreAuthorisation(CardRegistration $updatedCardRegister, Us $cardPreAuthorisation->AuthorId = $user->getMangoUserId(); $debitedFunds = new Money(); - $debitedFunds->Currency = "EUR"; + $debitedFunds->Currency = 'EUR'; $debitedFunds->Amount = $order->getMangoPrice(); $cardPreAuthorisation->DebitedFunds = $debitedFunds; - $cardPreAuthorisation->SecureMode = "DEFAULT"; + $cardPreAuthorisation->SecureMode = 'DEFAULT'; $cardPreAuthorisation->SecureModeReturnURL = $this->router->generate( - 'appventus_mangopaybundle_payment_finalize_secure', - array( + 'troopers_mangopaybundle_payment_finalize_secure', + [ 'orderId' => $order->getId(), - ), + ], true ); @@ -122,17 +121,19 @@ public function createPreAuthorisation(CardRegistration $updatedCardRegister, Us $preAuth = $this->mangopayHelper->CardPreAuthorizations->Create($cardPreAuthorisation); $event = new PreAuthorisationEvent($order, $preAuth); - $this->dispatcher->dispatch(AppVentusMangopayEvents::NEW_CARD_PREAUTHORISATION, $event); + $this->dispatcher->dispatch(TroopersMangopayEvents::NEW_CARD_PREAUTHORISATION, $event); return $preAuth; } + /** - * execute a pre authorisation + * execute a pre authorisation. + * * @param CardPreAuthorisation $preAuthorisation * @param UserInterface $buyer * @param Wallet $wallet - * @param integer $feesAmount - * @param integer $amount 0 to 100 + * @param int $feesAmount + * @param int $amount 0 to 100 * * @return PayIn */ @@ -142,9 +143,7 @@ public function executePreAuthorisation( Wallet $wallet, $feesAmount, $amount = null - ) - { - + ) { if (!$amount) { $amount = $preAuthorisation->getDebitedFunds(); } @@ -169,39 +168,36 @@ public function executePreAuthorisation( $payIn = $this->mangopayHelper->PayIns->Create($payIn); - if (property_exists($payIn, 'Status') && $payIn->Status != "FAILED") { + if (property_exists($payIn, 'Status') && $payIn->Status != 'FAILED') { $event = new PayInEvent($payIn); - $this->dispatcher->dispatch(AppVentusMangopayEvents::NEW_PAY_IN, $event); + $this->dispatcher->dispatch(TroopersMangopayEvents::NEW_PAY_IN, $event); - return $payIn; + return $payIn; } $event = new PayInEvent($payIn); - $this->dispatcher->dispatch(AppVentusMangopayEvents::ERROR_PAY_IN, $event); + $this->dispatcher->dispatch(TroopersMangopayEvents::ERROR_PAY_IN, $event); throw new MongopayPayInCreationException($this->translator->trans( - 'mangopay.error.'. $payIn->ResultCode, + 'mangopay.error.'.$payIn->ResultCode, [], 'messages' )); - } public function cancelPreAuthForOrder(Order $order, CardPreAuthorisation $preAuth) { - if ($preAuth->getPaymentStatus() == "WAITING") { - + if ($preAuth->getPaymentStatus() == 'WAITING') { $mangoCardPreAuthorisation = $this->mangopayHelper->CardPreAuthorizations->Get($preAuth->getMangoId()); $mangoCardPreAuthorisation->PaymentStatus = 'CANCELED'; $this->mangopayHelper->CardPreAuthorizations->Update($mangoCardPreAuthorisation); $event = new PreAuthorisationEvent($order, $mangoCardPreAuthorisation); - $this->dispatcher->dispatch(AppVentusMangopayEvents::CANCEL_CARD_PREAUTHORISATION, $event); + $this->dispatcher->dispatch(TroopersMangopayEvents::CANCEL_CARD_PREAUTHORISATION, $event); } } public function generateSuccessUrl() { - return $this->router->generate('appventus_mangopaybundle_payment_success'); + return $this->router->generate('troopers_mangopaybundle_payment_success'); } - } diff --git a/Helper/UserHelper.php b/Helper/UserHelper.php index 47e3356..11abb64 100644 --- a/Helper/UserHelper.php +++ b/Helper/UserHelper.php @@ -1,18 +1,16 @@ Email = $user->getEmail(); $mangoUser->FirstName = $user->getFirstname(); @@ -52,7 +50,7 @@ public function createMangoUser(UserInterface $user) $mangoUser = $this->mangopayHelper->Users->Create($mangoUser); $event = new UserEvent($user, $mangoUser); - $this->dispatcher->dispatch(AppVentusMangopayEvents::NEW_USER, $event); + $this->dispatcher->dispatch(TroopersMangopayEvents::NEW_USER, $event); $user->setMangoUserId($mangoUser->Id); @@ -61,5 +59,4 @@ public function createMangoUser(UserInterface $user) return $mangoUser; } - } diff --git a/Helper/WalletHelper.php b/Helper/WalletHelper.php index 6b50e84..8a20b20 100644 --- a/Helper/WalletHelper.php +++ b/Helper/WalletHelper.php @@ -1,17 +1,16 @@ getMangoWalletId()) { $wallet = $this->mangopayHelper->Wallets->get($user->getMangoWalletId()); // else, create a new mango user @@ -50,16 +49,15 @@ public function createWalletForUser(UserInterface $user, $description = 'current { $mangoUser = $this->userHelper->findOrCreateMangoUser($user); $mangoWallet = new Wallet(); - $mangoWallet->Owners = array($mangoUser->Id); - $mangoWallet->Currency = "EUR"; + $mangoWallet->Owners = [$mangoUser->Id]; + $mangoWallet->Currency = 'EUR'; $mangoWallet->Description = $description; $mangoWallet = $this->mangopayHelper->Wallets->create($mangoWallet); $event = new WalletEvent($mangoWallet, $user); - $this->dispatcher->dispatch(AppVentusMangopayEvents::NEW_WALLET, $event); + $this->dispatcher->dispatch(TroopersMangopayEvents::NEW_WALLET, $event); return $mangoWallet; } - } diff --git a/LICENSE.md b/LICENSE.md index 2638eda..6f66451 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 AppVentus +Copyright (c) 2016 Troopers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/OrderEvents.php b/OrderEvents.php index 7c76109..d56ce2b 100644 --- a/OrderEvents.php +++ b/OrderEvents.php @@ -1,14 +1,13 @@ get('appventus_mangopay.mango_api')->PayIns->create($payIn); + $this->get('troopers_mangopay.mango_api')->PayIns->create($payIn); ``` Additionnaly, there is some helpers that handle most of the mangopay actions. fell free to fork and implement yours @@ -42,7 +41,7 @@ It can register user BankInformations as it implements BankInformationInterface ```php $bankInformation = new BankInformation(); - $this->get('appventus_mangopay.bank_information_helper')->createBankAccount($bankInformation); + $this->get('troopers_mangopay.bank_information_helper')->createBankAccount($bankInformation); ``` PaymentHelper @@ -51,10 +50,10 @@ It can register a CardPreauthorisation and execute it ```php $cardRegistration = new CardRegistration(); - $this->get('appventus_mangopay.payment_helper')->createPreAuthorisation($cardRegistration); + $this->get('troopers_mangopay.payment_helper')->createPreAuthorisation($cardRegistration); $cardPreAuthorisation = new CardPreAuthorisation(); - $this->get('appventus_mangopay.payment_helper')->executePreAuthorisation($cardPreAuthorisation, $user, $wallet); + $this->get('troopers_mangopay.payment_helper')->executePreAuthorisation($cardPreAuthorisation, $user, $wallet); ``` PaymentDirectHelper @@ -63,7 +62,7 @@ It can create a new direct payment ```php $transaction = new Transaction(); - $this->get('appventus_mangopay.payment_direct_helper')->createDirectTransaction($transaction); + $this->get('troopers_mangopay.payment_direct_helper')->createDirectTransaction($transaction); ``` UserHelper @@ -72,7 +71,7 @@ It can create a new user in mangopay as the User object implements the UserInter ```php $user = new User(); - $this->get('appventus_mangopay.user_helper')->createMangoUser($user); + $this->get('troopers_mangopay.user_helper')->createMangoUser($user); ``` WalletHelper @@ -81,20 +80,20 @@ It can create a user wallet ```php $user = new User(); - $this->get('appventus_mangopay.wallet_helper')->createWalletForUser($user); + $this->get('troopers_mangopay.wallet_helper')->createWalletForUser($user); ``` This is the general workflow for the mangopay payment page: 1) Displaying the payment form to user -![Step 1](https://raw.githubusercontent.com/AppVentus/MangopayBundle/master/Resources/doc/assets/step1.jpg) +![Step 1](https://raw.githubusercontent.com/Troopers/MangopayBundle/master/Resources/doc/assets/step1.jpg) 2) Create mangopay user and the card registration through mangopay API -![Step 2](https://raw.githubusercontent.com/AppVentus/MangopayBundle/master/Resources/doc/assets/step2.jpg) +![Step 2](https://raw.githubusercontent.com/Troopers/MangopayBundle/master/Resources/doc/assets/step2.jpg) 3) Call the tokenisation server to validate the user credit card, use 3d secure if needed, update the CardR egistration with tokenized Card, create the PreAuthorisation then redirect the user to success page. -![Step 3](https://raw.githubusercontent.com/AppVentus/MangopayBundle/master/Resources/doc/assets/step3.jpg) +![Step 3](https://raw.githubusercontent.com/Troopers/MangopayBundle/master/Resources/doc/assets/step3.jpg) diff --git a/Resources/config/services.yml b/Resources/config/services.yml index 66c5116..2ae8780 100644 --- a/Resources/config/services.yml +++ b/Resources/config/services.yml @@ -1,63 +1,63 @@ parameters: - appventus_mangopay.mango_api.class: "AppVentus\\MangopayBundle\\Helper\\MangopayHelper" - appventus_mangopay.payment_helper.class: "AppVentus\\MangopayBundle\\Helper\\PaymentHelper" - appventus_mangopay.payment_direct_helper.class: "AppVentus\\MangopayBundle\\Helper\\PaymentDirectHelper" - appventus_mangopay.bankwire_helper.class: "AppVentus\\MangopayBundle\\Helper\\BankwireHelper" - appventus_mangopay.user_helper.class: "AppVentus\\MangopayBundle\\Helper\\UserHelper" - appventus_mangopay.bank_information_helper.class: "AppVentus\\MangopayBundle\\Helper\\BankInformationHelper" - appventus_mangopay.wallet_helper.class: "AppVentus\\MangopayBundle\\Helper\\WalletHelper" - appventus_mangopay.order.class: "AppVentus\\MangopayBundle\\Entity\\Order" - appventus_mangopay.form.card: "AppVentus\\MangopayBundle\\Form\\CardType" + troopers_mangopay.mango_api.class: "Troopers\\MangopayBundle\\Helper\\MangopayHelper" + troopers_mangopay.payment_helper.class: "Troopers\\MangopayBundle\\Helper\\PaymentHelper" + troopers_mangopay.payment_direct_helper.class: "Troopers\\MangopayBundle\\Helper\\PaymentDirectHelper" + troopers_mangopay.bankwire_helper.class: "Troopers\\MangopayBundle\\Helper\\BankwireHelper" + troopers_mangopay.user_helper.class: "Troopers\\MangopayBundle\\Helper\\UserHelper" + troopers_mangopay.bank_information_helper.class: "Troopers\\MangopayBundle\\Helper\\BankInformationHelper" + troopers_mangopay.wallet_helper.class: "Troopers\\MangopayBundle\\Helper\\WalletHelper" + troopers_mangopay.order.class: "Troopers\\MangopayBundle\\Entity\\Order" + troopers_mangopay.form.card: "Troopers\\MangopayBundle\\Form\\CardType" services: - appventus_mangopay.mango_api: - class: %appventus_mangopay.mango_api.class% + troopers_mangopay.mango_api: + class: %troopers_mangopay.mango_api.class% arguments: - - %appventus_mangopay.client_id% - - %appventus_mangopay.client_password% - - %appventus_mangopay.base_url% + - %troopers_mangopay.client_id% + - %troopers_mangopay.client_password% + - %troopers_mangopay.base_url% - "@event_dispatcher" - "@doctrine.orm.entity_manager" - - %appventus_mangopay.debug_mode% + - %troopers_mangopay.debug_mode% - appventus_mangopay.user_helper: - class: %appventus_mangopay.user_helper.class% + troopers_mangopay.user_helper: + class: %troopers_mangopay.user_helper.class% arguments: - - @appventus_mangopay.mango_api + - @troopers_mangopay.mango_api - @doctrine.orm.entity_manager - "@event_dispatcher" - appventus_mangopay.bank_information_helper: - class: %appventus_mangopay.bank_information_helper.class% + troopers_mangopay.bank_information_helper: + class: %troopers_mangopay.bank_information_helper.class% arguments: - - @appventus_mangopay.mango_api + - @troopers_mangopay.mango_api - @doctrine.orm.entity_manager - - @appventus_mangopay.user_helper - appventus_mangopay.wallet_helper: - class: %appventus_mangopay.wallet_helper.class% + - @troopers_mangopay.user_helper + troopers_mangopay.wallet_helper: + class: %troopers_mangopay.wallet_helper.class% arguments: - - @appventus_mangopay.mango_api - - @appventus_mangopay.user_helper + - @troopers_mangopay.mango_api + - @troopers_mangopay.user_helper - @doctrine.orm.entity_manager - "@event_dispatcher" - appventus_mangopay.payment_helper: - class: %appventus_mangopay.payment_helper.class% + troopers_mangopay.payment_helper: + class: %troopers_mangopay.payment_helper.class% arguments: - - @appventus_mangopay.mango_api + - @troopers_mangopay.mango_api - @router - "@event_dispatcher" - appventus_mangopay.payment_direct_helper: - class: %appventus_mangopay.payment_direct_helper.class% + troopers_mangopay.payment_direct_helper: + class: %troopers_mangopay.payment_direct_helper.class% arguments: - - @appventus_mangopay.mango_api + - @troopers_mangopay.mango_api - @router - "@event_dispatcher" - appventus_mangopay.bankwire_helper: - class: %appventus_mangopay.bankwire_helper.class% + troopers_mangopay.bankwire_helper: + class: %troopers_mangopay.bankwire_helper.class% arguments: - - @appventus_mangopay.mango_api + - @troopers_mangopay.mango_api - appventus_mangopay.form.card: - class: %appventus_mangopay.form.card% + troopers_mangopay.form.card: + class: %troopers_mangopay.form.card% tags: - { name: form.type } diff --git a/Resources/js/mangopay.js b/Resources/js/mangopay.js index ae991ae..8446feb 100644 --- a/Resources/js/mangopay.js +++ b/Resources/js/mangopay.js @@ -25,13 +25,13 @@ function payAjaxOrRedirect(ajaxUrl, }); // Collect sensitive card data from the form - var month = $("[data-id='appventus_mangopay_card_expiry_month']").val(); - var year = $("[data-id='appventus_mangopay_card_expiry_year']").val(); + var month = $("[data-id='troopers_mangopay_card_expiry_month']").val(); + var year = $("[data-id='troopers_mangopay_card_expiry_year']").val(); var cardData = { - cardNumber : $("[data-id='appventus_mangopay_card_number']").val(), + cardNumber : $("[data-id='troopers_mangopay_card_number']").val(), cardExpirationDate : pad(month, 2) + "" + pad(year, 2), - cardCvx : pad($("[data-id='appventus_mangopay_ccv']").val(), 3) + cardCvx : pad($("[data-id='troopers_mangopay_ccv']").val(), 3) }; // Process data diff --git a/Resources/views/cardPayment.html.twig b/Resources/views/cardPayment.html.twig index 19b9538..cb128ab 100644 --- a/Resources/views/cardPayment.html.twig +++ b/Resources/views/cardPayment.html.twig @@ -20,7 +20,7 @@

- {{ 'appventus.mangopay.payment_page.info_block'|trans }} + {{ 'troopers.mangopay.payment_page.info_block'|trans }}

@@ -73,13 +73,13 @@

- {{ 'appventus.mangopay.payment_page.helper_block'|trans }} + {{ 'troopers.mangopay.payment_page.helper_block'|trans }}

-
+ {{ form_rest(form) }}
@@ -88,32 +88,32 @@
- Powered by Mango Pay + Powered by Mango Pay
{% endjavascripts %} diff --git a/Tests/Controller/DefaultControllerTest.php b/Tests/Controller/DefaultControllerTest.php deleted file mode 100644 index e672f67..0000000 --- a/Tests/Controller/DefaultControllerTest.php +++ /dev/null @@ -1,17 +0,0 @@ -request('GET', '/hello/Fabien'); - - $this->assertTrue($crawler->filter('html:contains("Hello Fabien")')->count() > 0); - } -} diff --git a/TroopersMangopayBundle.php b/TroopersMangopayBundle.php new file mode 100644 index 0000000..0c7617b --- /dev/null +++ b/TroopersMangopayBundle.php @@ -0,0 +1,9 @@ +=5.0.0", - "symfony/framework-bundle" : ">=2.3", - "mangopay/php-sdk-v2" : "v2.0", - "appventus/ajax-bundle" : "*" + "php": "~5.3|~7", + "symfony/framework-bundle": ">=2.3", + "mangopay/php-sdk-v2": "v2.0", + "stof/doctrine-extensions-bundle": "~1.2.0", + "troopers/ajax-bundle": "~1.2.2" }, "autoload": { - "psr-0": { "AppVentus\\MangopayBundle": "" } + "psr-0": { "Troopers\\MangopayBundle": "" } }, - "target-dir": "AppVentus/MangopayBundle" + "target-dir": "Troopers/MangopayBundle" } diff --git a/composer.lock b/composer.lock deleted file mode 100644 index 32d6194..0000000 --- a/composer.lock +++ /dev/null @@ -1,1160 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "hash": "aa26c0d296c95f12cb65ddb3b4baaf36", - "packages": [ - { - "name": "appventus/ajax-bundle", - "version": "dev-master", - "target-dir": "AppVentus/AjaxBundle", - "source": { - "type": "git", - "url": "https://github.com/AppVentus/AvAjaxBundle.git", - "reference": "6731d8c39010349c3c19abaf23cffe3871f71206" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/AppVentus/AvAjaxBundle/zipball/6731d8c39010349c3c19abaf23cffe3871f71206", - "reference": "6731d8c39010349c3c19abaf23cffe3871f71206", - "shasum": "" - }, - "require-dev": { - "symfony/class-loader": "2.1.*" - }, - "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-0": { - "AppVentus\\AjaxBundle": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Leny Bernard (AppVentus)", - "email": "leny@appventus.com", - "homepage": "http://appventus.com" - } - ], - "description": "Symfony AjaxBundle", - "homepage": "http://appventus.com/bundles/ajax", - "keywords": [ - "ajax" - ], - "time": "2015-02-25 09:18:09" - }, - { - "name": "doctrine/annotations", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "b5202eb9e83f8db52e0e58867e0a46e63be8332e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/b5202eb9e83f8db52e0e58867e0a46e63be8332e", - "reference": "b5202eb9e83f8db52e0e58867e0a46e63be8332e", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "php": ">=5.3.2" - }, - "require-dev": { - "doctrine/cache": "1.*", - "phpunit/phpunit": "4.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Annotations\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "time": "2014-12-23 22:40:37" - }, - { - "name": "doctrine/lexer", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", - "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Lexer\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "lexer", - "parser" - ], - "time": "2014-09-09 13:34:57" - }, - { - "name": "mangopay/php-sdk-v2", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/MangoPay/mangopay2-php-sdk.git", - "reference": "636e42ba4515d4706845f5aa5fdf26679e79e096" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/MangoPay/mangopay2-php-sdk/zipball/636e42ba4515d4706845f5aa5fdf26679e79e096", - "reference": "636e42ba4515d4706845f5aa5fdf26679e79e096", - "shasum": "" - }, - "type": "library", - "autoload": { - "classmap": [ - "MangoPaySDK/mangoPayApi.inc" - ], - "files": [ - "MangoPaySDK/common/common.inc" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "SDK PHP for Mangopay api V2", - "time": "2015-03-25 10:53:14" - }, - { - "name": "psr/log", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "bf2c13de4300e227d7b2fd08027673a79c519987" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/bf2c13de4300e227d7b2fd08027673a79c519987", - "reference": "bf2c13de4300e227d7b2fd08027673a79c519987", - "shasum": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2015-03-26 14:39:45" - }, - { - "name": "symfony/asset", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/symfony/asset.git", - "reference": "809198b0cfaf6c7e73226b14bb72a274edb468c1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/asset/zipball/809198b0cfaf6c7e73226b14bb72a274edb468c1", - "reference": "809198b0cfaf6c7e73226b14bb72a274edb468c1", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/http-foundation": "~2.7|~3.0", - "symfony/phpunit-bridge": "~2.7|~3.0" - }, - "suggest": { - "symfony/http-foundation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Asset\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Asset Component", - "homepage": "http://symfony.com", - "time": "2015-02-21 13:23:59" - }, - { - "name": "symfony/config", - "version": "dev-master", - "target-dir": "Symfony/Component/Config", - "source": { - "type": "git", - "url": "https://github.com/symfony/Config.git", - "reference": "6b29caaa635c247bb54692f4f32780ce96b535f0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Config/zipball/6b29caaa635c247bb54692f4f32780ce96b535f0", - "reference": "6b29caaa635c247bb54692f4f32780ce96b535f0", - "shasum": "" - }, - "require": { - "php": ">=5.5.9", - "symfony/filesystem": "~2.7|~3.0" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7|~3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Config\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Config Component", - "homepage": "http://symfony.com", - "time": "2015-03-30 15:59:03" - }, - { - "name": "symfony/debug", - "version": "dev-master", - "target-dir": "Symfony/Component/Debug", - "source": { - "type": "git", - "url": "https://github.com/symfony/Debug.git", - "reference": "87414569904e194cc8225353f33df4756b6bb79d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Debug/zipball/87414569904e194cc8225353f33df4756b6bb79d", - "reference": "87414569904e194cc8225353f33df4756b6bb79d", - "shasum": "" - }, - "require": { - "php": ">=5.5.9", - "psr/log": "~1.0" - }, - "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" - }, - "require-dev": { - "symfony/class-loader": "~2.7|~3.0", - "symfony/http-foundation": "~2.7|~3.0", - "symfony/http-kernel": "~2.7|~3.0", - "symfony/phpunit-bridge": "~2.7|~3.0" - }, - "suggest": { - "symfony/http-foundation": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Debug\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Debug Component", - "homepage": "http://symfony.com", - "time": "2015-03-24 17:09:17" - }, - { - "name": "symfony/dependency-injection", - "version": "dev-master", - "target-dir": "Symfony/Component/DependencyInjection", - "source": { - "type": "git", - "url": "https://github.com/symfony/DependencyInjection.git", - "reference": "4d12bccee943457b8999dcf83c31f62971173c20" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/4d12bccee943457b8999dcf83c31f62971173c20", - "reference": "4d12bccee943457b8999dcf83c31f62971173c20", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "require-dev": { - "symfony/config": "~2.7|~3.0", - "symfony/expression-language": "~2.7|~3.0", - "symfony/phpunit-bridge": "~2.7|~3.0", - "symfony/yaml": "~2.7|~3.0" - }, - "suggest": { - "symfony/config": "", - "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\DependencyInjection\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony DependencyInjection Component", - "homepage": "http://symfony.com", - "time": "2015-03-30 15:59:03" - }, - { - "name": "symfony/event-dispatcher", - "version": "dev-master", - "target-dir": "Symfony/Component/EventDispatcher", - "source": { - "type": "git", - "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "b715478e00418f52557f271d1fcee0a3edf6e19c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/b715478e00418f52557f271d1fcee0a3edf6e19c", - "reference": "b715478e00418f52557f271d1fcee0a3edf6e19c", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.7|~3.0", - "symfony/dependency-injection": "~2.7|~3.0", - "symfony/expression-language": "~2.7|~3.0", - "symfony/phpunit-bridge": "~2.7|~3.0", - "symfony/stopwatch": "~2.7|~3.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "http://symfony.com", - "time": "2015-02-21 13:23:59" - }, - { - "name": "symfony/filesystem", - "version": "dev-master", - "target-dir": "Symfony/Component/Filesystem", - "source": { - "type": "git", - "url": "https://github.com/symfony/Filesystem.git", - "reference": "afb9d158555bee3441dc5c1e68d9c35d332543eb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Filesystem/zipball/afb9d158555bee3441dc5c1e68d9c35d332543eb", - "reference": "afb9d158555bee3441dc5c1e68d9c35d332543eb", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7|~3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Filesystem\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Filesystem Component", - "homepage": "http://symfony.com", - "time": "2015-03-24 17:09:17" - }, - { - "name": "symfony/framework-bundle", - "version": "dev-master", - "target-dir": "Symfony/Bundle/FrameworkBundle", - "source": { - "type": "git", - "url": "https://github.com/symfony/FrameworkBundle.git", - "reference": "2e88c348287031106b9299e3ee751b240293c9d8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/FrameworkBundle/zipball/2e88c348287031106b9299e3ee751b240293c9d8", - "reference": "2e88c348287031106b9299e3ee751b240293c9d8", - "shasum": "" - }, - "require": { - "doctrine/annotations": "~1.0", - "php": ">=5.5.9", - "symfony/asset": "~2.7|~3.0", - "symfony/config": "~2.7|~3.0", - "symfony/dependency-injection": "~2.7|~3.0", - "symfony/event-dispatcher": "~2.7|~3.0", - "symfony/filesystem": "~2.7|~3.0", - "symfony/http-foundation": "~2.7|~3.0", - "symfony/http-kernel": "~2.7|~3.0", - "symfony/routing": "~3.0", - "symfony/security-core": "~2.7|~3.0", - "symfony/security-csrf": "~2.7|~3.0", - "symfony/stopwatch": "~2.7|~3.0", - "symfony/templating": "~2.7|~3.0", - "symfony/translation": "~2.7|~3.0" - }, - "require-dev": { - "symfony/browser-kit": "~2.7|~3.0", - "symfony/class-loader": "~2.7|~3.0", - "symfony/console": "~2.7|~3.0", - "symfony/css-selector": "~2.7|~3.0", - "symfony/dom-crawler": "~2.7|~3.0", - "symfony/expression-language": "~2.7|~3.0", - "symfony/finder": "~2.7|~3.0", - "symfony/form": "~2.7|~3.0", - "symfony/intl": "~2.7|~3.0", - "symfony/phpunit-bridge": "~2.7|~3.0", - "symfony/process": "~2.7|~3.0", - "symfony/security": "~2.7|~3.0", - "symfony/validator": "~2.7|~3.0", - "symfony/yaml": "~2.7|~3.0" - }, - "suggest": { - "doctrine/cache": "For using alternative cache drivers", - "symfony/console": "For using the console commands", - "symfony/finder": "For using the translation loader and cache warmer", - "symfony/form": "For using forms", - "symfony/validator": "For using validation", - "symfony/yaml": "For using the debug:config and yaml:lint commands" - }, - "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Bundle\\FrameworkBundle\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony FrameworkBundle", - "homepage": "http://symfony.com", - "time": "2015-03-30 15:59:03" - }, - { - "name": "symfony/http-foundation", - "version": "dev-master", - "target-dir": "Symfony/Component/HttpFoundation", - "source": { - "type": "git", - "url": "https://github.com/symfony/HttpFoundation.git", - "reference": "b90e375dc3d5001023f7af8ee9ece90a8bb93c46" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/b90e375dc3d5001023f7af8ee9ece90a8bb93c46", - "reference": "b90e375dc3d5001023f7af8ee9ece90a8bb93c46", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "require-dev": { - "symfony/expression-language": "~2.7|~3.0", - "symfony/phpunit-bridge": "~2.7|~3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "classmap": [ - "Symfony/Component/HttpFoundation/Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony HttpFoundation Component", - "homepage": "http://symfony.com", - "time": "2015-03-30 15:59:03" - }, - { - "name": "symfony/http-kernel", - "version": "dev-master", - "target-dir": "Symfony/Component/HttpKernel", - "source": { - "type": "git", - "url": "https://github.com/symfony/HttpKernel.git", - "reference": "2e02fb47f7fef26acfdcb2df6914dfe498a239fd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/2e02fb47f7fef26acfdcb2df6914dfe498a239fd", - "reference": "2e02fb47f7fef26acfdcb2df6914dfe498a239fd", - "shasum": "" - }, - "require": { - "php": ">=5.5.9", - "psr/log": "~1.0", - "symfony/debug": "~2.7|~3.0", - "symfony/event-dispatcher": "~2.7|~3.0", - "symfony/http-foundation": "~2.7|~3.0" - }, - "require-dev": { - "symfony/browser-kit": "~2.7|~3.0", - "symfony/class-loader": "~2.7|~3.0", - "symfony/config": "~2.7|~3.0", - "symfony/console": "~2.7|~3.0", - "symfony/css-selector": "~2.7|~3.0", - "symfony/dependency-injection": "~2.7|~3.0", - "symfony/dom-crawler": "~2.7|~3.0", - "symfony/expression-language": "~2.7|~3.0", - "symfony/finder": "~2.7|~3.0", - "symfony/phpunit-bridge": "~2.7|~3.0", - "symfony/process": "~2.7|~3.0", - "symfony/routing": "~2.7|~3.0", - "symfony/stopwatch": "~2.7|~3.0", - "symfony/templating": "~2.7|~3.0", - "symfony/translation": "~2.7|~3.0", - "symfony/var-dumper": "~2.7|~3.0" - }, - "suggest": { - "symfony/browser-kit": "", - "symfony/class-loader": "", - "symfony/config": "", - "symfony/console": "", - "symfony/dependency-injection": "", - "symfony/finder": "", - "symfony/var-dumper": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\HttpKernel\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony HttpKernel Component", - "homepage": "http://symfony.com", - "time": "2015-03-30 15:59:03" - }, - { - "name": "symfony/routing", - "version": "dev-master", - "target-dir": "Symfony/Component/Routing", - "source": { - "type": "git", - "url": "https://github.com/symfony/Routing.git", - "reference": "326502d3525b7e39c12e2b9a56dccd8833782496" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Routing/zipball/326502d3525b7e39c12e2b9a56dccd8833782496", - "reference": "326502d3525b7e39c12e2b9a56dccd8833782496", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "require-dev": { - "doctrine/annotations": "~1.0", - "doctrine/common": "~2.2", - "psr/log": "~1.0", - "symfony/config": "~2.7|~3.0", - "symfony/expression-language": "~2.7|~3.0", - "symfony/http-foundation": "~2.7|~3.0", - "symfony/phpunit-bridge": "~2.7|~3.0", - "symfony/yaml": "~2.7|~3.0" - }, - "suggest": { - "doctrine/annotations": "For using the annotation loader", - "symfony/config": "For using the all-in-one router or any loader", - "symfony/expression-language": "For using expression matching", - "symfony/yaml": "For using the YAML loader" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Routing\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Routing Component", - "homepage": "http://symfony.com", - "keywords": [ - "router", - "routing", - "uri", - "url" - ], - "time": "2015-03-30 15:59:03" - }, - { - "name": "symfony/security-core", - "version": "dev-master", - "target-dir": "Symfony/Component/Security/Core", - "source": { - "type": "git", - "url": "https://github.com/symfony/security-core.git", - "reference": "36c4f98cfffa701ffc9e49b645565b04c4619249" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/security-core/zipball/36c4f98cfffa701ffc9e49b645565b04c4619249", - "reference": "36c4f98cfffa701ffc9e49b645565b04c4619249", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.7|~3.0", - "symfony/expression-language": "~2.7|~3.0", - "symfony/http-foundation": "~2.7|~3.0", - "symfony/phpunit-bridge": "~2.7|~3.0", - "symfony/translation": "~2.7|~3.0", - "symfony/validator": "~2.7|~3.0" - }, - "suggest": { - "symfony/event-dispatcher": "", - "symfony/expression-language": "For using the expression voter", - "symfony/http-foundation": "", - "symfony/validator": "For using the user password constraint" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Security\\Core\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Security Component - Core Library", - "homepage": "http://symfony.com", - "time": "2015-03-30 15:59:03" - }, - { - "name": "symfony/security-csrf", - "version": "dev-master", - "target-dir": "Symfony/Component/Security/Csrf", - "source": { - "type": "git", - "url": "https://github.com/symfony/security-csrf.git", - "reference": "4745b4802e3503d2eb607037f03f32e8da476203" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/security-csrf/zipball/4745b4802e3503d2eb607037f03f32e8da476203", - "reference": "4745b4802e3503d2eb607037f03f32e8da476203", - "shasum": "" - }, - "require": { - "php": ">=5.5.9", - "symfony/security-core": "~2.7|~3.0" - }, - "require-dev": { - "symfony/http-foundation": "~2.7|~3.0", - "symfony/phpunit-bridge": "~2.7|~3.0" - }, - "suggest": { - "symfony/http-foundation": "For using the class SessionTokenStorage." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Security\\Csrf\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Security Component - CSRF Library", - "homepage": "http://symfony.com", - "time": "2015-02-21 13:23:59" - }, - { - "name": "symfony/stopwatch", - "version": "dev-master", - "target-dir": "Symfony/Component/Stopwatch", - "source": { - "type": "git", - "url": "https://github.com/symfony/Stopwatch.git", - "reference": "bae98f9404e96f48e5e89f2fd3bb3f2dce52e431" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Stopwatch/zipball/bae98f9404e96f48e5e89f2fd3bb3f2dce52e431", - "reference": "bae98f9404e96f48e5e89f2fd3bb3f2dce52e431", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7|~3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Stopwatch\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Stopwatch Component", - "homepage": "http://symfony.com", - "time": "2015-03-24 17:09:17" - }, - { - "name": "symfony/templating", - "version": "dev-master", - "target-dir": "Symfony/Component/Templating", - "source": { - "type": "git", - "url": "https://github.com/symfony/Templating.git", - "reference": "53f0ba8c9311fe12aa6d18a6c10828ff13d73b4c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Templating/zipball/53f0ba8c9311fe12aa6d18a6c10828ff13d73b4c", - "reference": "53f0ba8c9311fe12aa6d18a6c10828ff13d73b4c", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/phpunit-bridge": "~2.7|~3.0" - }, - "suggest": { - "psr/log": "For using debug logging in loaders" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Templating\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Templating Component", - "homepage": "http://symfony.com", - "time": "2015-03-13 18:00:11" - }, - { - "name": "symfony/translation", - "version": "dev-master", - "target-dir": "Symfony/Component/Translation", - "source": { - "type": "git", - "url": "https://github.com/symfony/Translation.git", - "reference": "9b339e296361ffeb3a0c6abd565ae116dd09837f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Translation/zipball/9b339e296361ffeb3a0c6abd565ae116dd09837f", - "reference": "9b339e296361ffeb3a0c6abd565ae116dd09837f", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.7|~3.0", - "symfony/intl": "~2.7|~3.0", - "symfony/phpunit-bridge": "~2.7|~3.0", - "symfony/yaml": "~2.7|~3.0" - }, - "suggest": { - "psr/log": "To use logging capability in translator", - "symfony/config": "", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Translation\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Translation Component", - "homepage": "http://symfony.com", - "time": "2015-03-30 15:59:03" - } - ], - "packages-dev": [], - "aliases": [], - "minimum-stability": "dev", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=5.0.0" - }, - "platform-dev": [] -}