https://geuther.426.agency/api/_action/paypal/webhook/execute?sw-token=N8uZX4WPnbHwzJb0XCgjDlxOC81TJJlc

Exceptions

Shopware token is invalid

  • Exception
  • Logs
  • Stack Trace

Symfony\Component\HttpKernel\Exception\ BadRequestHttpException

  1.             if ($systemConfigEntity->getConfigurationKey() === Settings::WEBHOOK_EXECUTE_TOKEN) {
  2.                 return;
  3.             }
  4.         }
  5.         throw new BadRequestHttpException('Shopware token is invalid');
  6.     }
  7. }
WebhookController->validateShopwareToken() in custom/plugins/SwagPayPal/src/Webhook/WebhookController.php (line 101)
  1.      * )
  2.      */
  3.     public function executeWebhook(Request $requestContext $context): Response
  4.     {
  5.         $token $this->getShopwareToken($request);
  6.         $this->validateShopwareToken($token$context);
  7.         $webhook $this->createWebhookFromPostData($request);
  8.         $this->tryToExecuteWebhook($context$webhook);
  9.         return new Response();
in vendor/symfony/http-kernel/HttpKernel.php -> executeWebhook (line 163)
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.     {
  2.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3.         $this->requestStack->push($request);
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
  1.         if (!IpUtils::checkIp('127.0.0.1'$trustedProxies)) {
  2.             Request::setTrustedProxies(array_merge($trustedProxies, ['127.0.0.1']), Request::getTrustedHeaderSet());
  3.         }
  4.         try {
  5.             return $kernel->handle($request$type$catch);
  6.         } finally {
  7.             // restore global state
  8.             Request::setTrustedProxies($trustedProxies$trustedHeaderSet);
  9.         }
  10.     }
  1.         if ($this->surrogate) {
  2.             $this->surrogate->addSurrogateCapability($request);
  3.         }
  4.         // always a "master" request (as the real master request can be in cache)
  5.         $response SubRequestHandler::handle($this->kernel$requestHttpKernelInterface::MAIN_REQUEST$catch);
  6.         /*
  7.          * Support stale-if-error given on Responses or as a config option.
  8.          * RFC 7234 summarizes in Section 4.2.4 (but also mentions with the individual
  9.          * Cache-Control directives) that
  1.      */
  2.     protected function pass(Request $requestbool $catch false)
  3.     {
  4.         $this->record($request'pass');
  5.         return $this->forward($request$catch);
  6.     }
  7.     /**
  8.      * Invalidates non-safe methods (like POST, PUT, and DELETE).
  9.      *
  1.      *
  2.      * @see RFC2616 13.10
  3.      */
  4.     protected function invalidate(Request $requestbool $catch false)
  5.     {
  6.         $response $this->pass($request$catch);
  7.         // invalidate only when the response is successful
  8.         if ($response->isSuccessful() || $response->isRedirect()) {
  9.             try {
  10.                 $this->store->invalidate($request);
  1.         }
  2.         $this->traces[$this->getTraceKey($request)] = [];
  3.         if (!$request->isMethodSafe()) {
  4.             $response $this->invalidate($request$catch);
  5.         } elseif ($request->headers->has('expect') || !$request->isMethodCacheable()) {
  6.             $response $this->pass($request$catch);
  7.         } elseif ($this->options['allow_reload'] && $request->isNoCache()) {
  8.             /*
  9.                 If allow_reload is configured and the client requests "Cache-Control: no-cache",
  1.             && $container->getParameter('shopware.http.cache.enabled');
  2.         if ($enabled && $container->has(CacheStore::class)) {
  3.             $kernel = new static::$httpCacheClass($kernel$container->get(CacheStore::class), null, ['debug' => $this->debug]);
  4.         }
  5.         $response $kernel->handle($transformed$type$catch);
  6.         // fire event to trigger runtime events like seo url headers
  7.         $event = new BeforeSendResponseEvent($transformed$response);
  8.         $container->get('event_dispatcher')->dispatch($event);
in vendor/shopware/core/HttpKernel.php -> doHandle (line 79)
  1.         if (!\is_bool($catch)) {
  2.             Feature::triggerDeprecationOrThrow('v6.5.0.0''The third parameter `$catch` of `HttpKernel->handle()` will be typed to `bool`');
  3.         }
  4.         try {
  5.             return $this->doHandle($request, (int) $type, (bool) $catch);
  6.         } catch (\Doctrine\DBAL\Exception $e) {
  7.             /** @var Params|array{url?: string} $connectionParams */
  8.             $connectionParams self::getConnection()->getParams();
  9.             $message str_replace([$connectionParams['url'] ?? null$connectionParams['password'] ?? null$connectionParams['user'] ?? null], '******'$e->getMessage());
HttpKernel->handle() in public/index.php (line 85)
  1.     }
  2. } else {
  3.     $kernel = new InstallerKernel($appEnv$debug);
  4. }
  5. $result $kernel->handle($request);
  6. if ($result instanceof Response) {
  7.     $result->send();
  8.     $kernel->terminate($request$result);
  9. } else {