container->get('net15.payment.mode.manager')->getByPublicKey($publicKey); // We recover the transaction publicKey from the session $transaction = $this->container->get('net15.transaction.manager')->getByPublicKey($request->getSession()->get('transactionPK')); $transaction = $this->container->get('net15.transaction.manager')->addPaymentMode($transaction,$paymentMode); return $this->render('@Payment/Default/payment.details.html.twig',[ 'transaction'=>$transaction, 'paymentMode'=>$paymentMode, 'rout'=>'api_payline3x_tunnel' ]); } /** * @param Request $request * @return \Symfony\Component\HttpFoundation\RedirectResponse * @throws \Exception */ public function tunnel(Request $request){ $transaction = $this->get('net15.transaction.manager')->getByPublicKey($request->getSession()->get('transactionPK')); $paylineInit = $this->get('net15.payment.payline.manager')->initPayment($transaction); // And redirect to Payline platform return $this->redirect($paylineInit['redirectURL']); } /** * @param string $publicKey * @param Request $request * @return \Symfony\Component\HttpFoundation\RedirectResponse * @throws \Exception */ public function payLine3xConfirmation(string $publicKey, Request $request){ $transaction = $this->get('net15.transaction.manager')->getByPublicKey($publicKey); $paylineToken = $request->get('paylinetoken'); $paymentResultRedirection = $this->get('net15.payment.payline.manager')->confirmationPayment($transaction, $paylineToken); return $this->redirect($paymentResultRedirection); } public function success(){ return $this->render('@Payment/Default/payment.success.response.html.twig'); } public function cancel(){ return $this->render('@Payment/Default/payment.cancel.response.html.twig'); } }