romeritoCL /
paypal-playground
| 1 | <?php |
||
| 2 | |||
| 3 | namespace App\Controller\Paypal; |
||
| 4 | |||
| 5 | use App\Service\SettingsService; |
||
| 6 | use Symfony\Component\Routing\Annotation\Route; |
||
| 7 | use Symfony\Component\HttpFoundation\Response; |
||
| 8 | |||
| 9 | /** |
||
| 10 | * Class VaultController |
||
| 11 | * @package App\Controller\Paypal |
||
| 12 | * |
||
| 13 | * @Route("/paypal/vault", name="paypal-vault-") |
||
| 14 | */ |
||
| 15 | class VaultController extends AbstractController |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @Route("/payment", name="payment", methods={"GET"}, defaults={"action" = "payment"}) |
||
| 19 | * |
||
| 20 | * @param string $action |
||
| 21 | * |
||
| 22 | * @return Response |
||
| 23 | */ |
||
| 24 | public function vaultPayment(string $action) |
||
| 25 | { |
||
| 26 | $customerId = $this->settingsService->getSetting('settings-customer-id'); |
||
| 27 | $dataUserIdToken = $this->paypalService->getVaultService()->getDataUserIdToken($customerId); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 28 | return $this->render('paypal/vault/'. $action .'.html.twig', [ |
||
| 29 | 'dataUserIdToken' => $dataUserIdToken, |
||
| 30 | |||
| 31 | ]); |
||
| 32 | } |
||
| 33 | } |
||
| 34 |