public function newAction(Request $request)
    {
        $paymentServiceProvider = new PaymentServiceProvider();
        $form = $this->createForm('EcommerceBundle\Form\PaymentServiceProviderType', $paymentServiceProvider);
        $form->handleRequest($request);

        if ($form->isSubmitted() && $form->isValid()) {
             
            $em = $this->getDoctrine()->getManager();
            $em->persist($paymentServiceProvider);
            $em->persist($paymentServiceProvider->getPaymentMethod());
            $em->flush();

            return $this->redirectToRoute('ecommerce_paymentserviceprovider_show', array('id' => $paymentServiceProvider->getId()));
        }

        return array(
            'paymentServiceProvider' => $paymentServiceProvider,
            'form' => $form->createView(),
        );
    }