public function editAction(Request $request, PaymentServiceProvider $paymentServiceProvider)
    {
        $deleteForm = $this->createDeleteForm($paymentServiceProvider);
        $editForm = $this->createForm('EcommerceBundle\Form\PaymentServiceProviderType', $paymentServiceProvider);
        $editForm->handleRequest($request);

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

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

        return array(
            'entity' => $paymentServiceProvider,
            'edit_form' => $editForm->createView(),
            'delete_form' => $deleteForm->createView(),
        );
    }