src/PHPDish/Bundle/PaymentBundle/Controller/PaymentController.php
public function withdrawAction(Request $request)
    {
        $this->denyAccessUnlessGranted('IS_AUTHENTICATED_REMEMBERED');
        $walletManager = $this->getWalletManager();
        $wallet = $walletManager->getUserWallet($this->getUser());
        $history = $walletManager->withdraw($wallet,
            $request->request->get('amount'),
            $request->request->get('alipay_account')
        );
        $view = $this->view([
            'history' => $history
        ])->setContext((new Context())->setGroups(['Default']));
        return $this->handleView($view);
    }
public function withdrawAction(Request $request)
    {
        $this->denyAccessUnlessGranted('IS_AUTHENTICATED_REMEMBERED');
        $walletManager = $this->getWalletManager();
        $wallet = $walletManager->getUserWallet($this->getUser());
        $history = $walletManager->withdraw($wallet,
            $request->request->get('amount'),
            $request->request->get('alipay_account')
        );
        $view = $this->view([
            'history' => $history
        ])->setContext((new Context())->setGroups(['Default']));
        return $this->handleView($view);
    }
处理消息推送
@Route("/wallet/withdraw", name="wallet_withdraw")
@param Request $request
@return Response