@@ 96-107 (lines=12) @@ | ||
93 | * @param string $paymentId |
|
94 | * @return Response | RedirectResponse |
|
95 | */ |
|
96 | public function paymentsCapture(string $paymentId) |
|
97 | { |
|
98 | if (!$this->sessionService->isActive()) { |
|
99 | return $this->redirectToRoute('index'); |
|
100 | } |
|
101 | $capture = $this->paypalService->getPaymentService()->capturePayment($paymentId); |
|
102 | return $this->render('paypal/authenticated/result.html.twig', [ |
|
103 | 'raw_result' => false, |
|
104 | 'result' => $capture, |
|
105 | 'result_id' => 'payment-id' |
|
106 | ]); |
|
107 | } |
|
108 | ||
109 | /** |
|
110 | * @Route("/logged-in/payouts", name="payouts") |
|
@@ 154-165 (lines=12) @@ | ||
151 | * @param string $statusId |
|
152 | * @return Response | RedirectResponse |
|
153 | */ |
|
154 | public function payoutsRefresh(string $statusId) |
|
155 | { |
|
156 | if (!$this->sessionService->isActive()) { |
|
157 | return $this->redirectToRoute('index'); |
|
158 | } |
|
159 | $payout = $this->paypalService->getPayoutService()->getPayout($statusId); |
|
160 | return $this->render('paypal/authenticated/result.html.twig', [ |
|
161 | 'raw_result' => false, |
|
162 | 'result' => $payout, |
|
163 | 'result_id' => $payout->getBatchHeader()->getPayoutBatchId() |
|
164 | ]); |
|
165 | } |
|
166 | ||
167 | /** |
|
168 | * @Route("/logged-in/invoices", name="invoices") |
|
@@ 214-225 (lines=12) @@ | ||
211 | * @param string $invoiceId |
|
212 | * @return Response | RedirectResponse |
|
213 | */ |
|
214 | public function invoicesRefresh(string $invoiceId) |
|
215 | { |
|
216 | if (!$this->sessionService->isActive()) { |
|
217 | return $this->redirectToRoute('index'); |
|
218 | } |
|
219 | $invoice = $this->paypalService->getInvoiceService()->getInvoice($invoiceId); |
|
220 | return $this->render('paypal/authenticated/result.html.twig', [ |
|
221 | 'raw_result' => false, |
|
222 | 'result' => $invoice, |
|
223 | 'result_id' => $invoice->getId() |
|
224 | ]); |
|
225 | } |
|
226 | } |
|
227 |