vendor/shopware/core/Checkout/Payment/Exception/InvalidTokenException.php line 10

  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Checkout\Payment\Exception;
  3. use Shopware\Core\Framework\Log\Package;
  4. use Shopware\Core\Framework\ShopwareHttpException;
  5. use Symfony\Component\HttpFoundation\Response;
  6. #[Package('checkout')]
  7. class InvalidTokenException extends ShopwareHttpException
  8. {
  9.     public function __construct(string $token, ?\Throwable $e null)
  10.     {
  11.         parent::__construct(
  12.             'The provided token {{ token }} is invalid and the payment could not be processed.',
  13.             ['token' => $token],
  14.             $e
  15.         );
  16.     }
  17.     public function getErrorCode(): string
  18.     {
  19.         return 'CHECKOUT__INVALID_PAYMENT_TOKEN';
  20.     }
  21.     public function getStatusCode(): int
  22.     {
  23.         return Response::HTTP_BAD_REQUEST;
  24.     }
  25. }