diff --git a/src/Controller/PayPalButtonsController.php b/src/Controller/PayPalButtonsController.php index 6fccfe76..6f3734ad 100644 --- a/src/Controller/PayPalButtonsController.php +++ b/src/Controller/PayPalButtonsController.php @@ -8,7 +8,6 @@ use Sylius\Component\Channel\Context\ChannelContextInterface; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\OrderInterface; -use Sylius\Component\Core\Model\Payment; use Sylius\Component\Core\Model\PaymentInterface; use Sylius\Component\Core\Model\PaymentMethodInterface; use Sylius\Component\Core\Repository\OrderRepositoryInterface; @@ -149,8 +148,6 @@ public function renderPaymentPageButtonsAction(Request $request): Response public function renderPayPalPaymentAction(Request $request): Response { $orderId = $request->attributes->getInt('orderId'); - /** @var ChannelInterface $channel */ - $channel = $this->channelContext->getChannel(); /** @var OrderInterface $order */ $order = $this->orderRepository->find($orderId); /** @var PaymentInterface $payment */ @@ -178,7 +175,7 @@ public function renderPayPalPaymentAction(Request $request): Response 'currency' => $order->getCurrencyCode(), 'locale' => $request->getLocale(), 'merchant_id' => $gatewayConfig->getConfig()['merchant_id'], - 'order_token' => 'test', + 'order_id' => $order->getId(), 'partner_attribution_id' => $partnerAttributionId, ])); } diff --git a/src/DependencyInjection/SyliusPayPalExtension.php b/src/DependencyInjection/SyliusPayPalExtension.php index 7de97d77..8e18ada4 100644 --- a/src/DependencyInjection/SyliusPayPalExtension.php +++ b/src/DependencyInjection/SyliusPayPalExtension.php @@ -20,7 +20,7 @@ public function load(array $config, ContainerBuilder $container): void $container->setParameter('sylius.paypal.logging.increased', $config['logging']['increased']); if ($config['sandbox']) { - $container->setParameter('sylius.pay_pal.facilitator_url', 'https://sylius.local:8001'); + $container->setParameter('sylius.pay_pal.facilitator_url', 'https://paypal.sylius.com'); $container->setParameter('sylius.pay_pal.api_base_url', 'https://api.sandbox.paypal.com/'); $container->setParameter('sylius.pay_pal.reports_sftp_host', 'reports.sandbox.paypal.com'); } else { diff --git a/src/Resources/config/shop_routing.yaml b/src/Resources/config/shop_routing.yaml index 835c8ed1..149671ee 100644 --- a/src/Resources/config/shop_routing.yaml +++ b/src/Resources/config/shop_routing.yaml @@ -5,7 +5,7 @@ sylius_paypal_plugin_pay_with_paypal_form: _controller: Sylius\PayPalPlugin\Controller\PayWithPayPalFormAction sylius_paypal_plugin_create_paypal_order: - path: /create-pay-pal-order/{token} + path: /create-pay-pal-order/{id} methods: [POST] defaults: _controller: Sylius\PayPalPlugin\Controller\CreatePayPalOrderAction diff --git a/src/Resources/views/payWithPaypal.html.twig b/src/Resources/views/payWithPaypal.html.twig index b0cbed4d..a9a245b0 100644 --- a/src/Resources/views/payWithPaypal.html.twig +++ b/src/Resources/views/payWithPaypal.html.twig @@ -150,8 +150,7 @@