@@ 72-83 (lines=12) @@ | ||
69 | * @param string $paymentId |
|
70 | * @return Response | RedirectResponse |
|
71 | */ |
|
72 | public function paymentsCapture(string $paymentId) |
|
73 | { |
|
74 | if (!$this->sessionService->isActive()) { |
|
75 | return $this->redirectToRoute('paypal-index'); |
|
76 | } |
|
77 | $capture = $this->paypalService->getPaymentService()->capturePayment($paymentId); |
|
78 | return $this->render('paypal/authenticated/result.html.twig', [ |
|
79 | 'raw_result' => false, |
|
80 | 'result' => $capture, |
|
81 | 'result_id' => 'payment-id' |
|
82 | ]); |
|
83 | } |
|
84 | ||
85 | /** |
|
86 | * @Route("/payouts", name="payouts", methods={"GET"}) |
|
@@ 130-141 (lines=12) @@ | ||
127 | * @param string $statusId |
|
128 | * @return Response | RedirectResponse |
|
129 | */ |
|
130 | public function payoutsRefresh(string $statusId) |
|
131 | { |
|
132 | if (!$this->sessionService->isActive()) { |
|
133 | return $this->redirectToRoute('paypal-index'); |
|
134 | } |
|
135 | $payout = $this->paypalService->getPayoutService()->getPayout($statusId); |
|
136 | return $this->render('paypal/authenticated/result.html.twig', [ |
|
137 | 'raw_result' => false, |
|
138 | 'result' => $payout, |
|
139 | 'result_id' => $payout->getBatchHeader()->getPayoutBatchId() |
|
140 | ]); |
|
141 | } |
|
142 | ||
143 | /** |
|
144 | * @Route("/invoices", name="invoices", methods={"GET"}) |
|
@@ 190-201 (lines=12) @@ | ||
187 | * @param string $invoiceId |
|
188 | * @return Response | RedirectResponse |
|
189 | */ |
|
190 | public function invoicesRefresh(string $invoiceId) |
|
191 | { |
|
192 | if (!$this->sessionService->isActive()) { |
|
193 | return $this->redirectToRoute('paypal-index'); |
|
194 | } |
|
195 | $invoice = $this->paypalService->getInvoiceService()->getInvoice($invoiceId); |
|
196 | return $this->render('paypal/authenticated/result.html.twig', [ |
|
197 | 'raw_result' => false, |
|
198 | 'result' => $invoice, |
|
199 | 'result_id' => $invoice->getId() |
|
200 | ]); |
|
201 | } |
|
202 | ||
203 | /** |
|
204 | * @Route("/subscriptions", name="subscriptions", methods={"GET"}) |