/** * {@inheritdoc} */ public function getPaymentCallbackResponse(Request $request) { // retrieve the transaction $transaction = $this->createTransaction($request); $order = $this->getValidOrder($transaction); // start the payment callback $response = $this->getPayment($transaction->getPaymentCode())->callback($transaction); $this->transactionManager->save($transaction); $this->orderManager->save($order); $this->notificationBackend->createAndPublish('sonata_payment_order_process', array('order_id' => $order->getId(), 'transaction_id' => $transaction->getId())); return $response; }