Add TrustedRedirectResponse use statement in StripeController.php

Created on 30 April 2025, 2 months ago

Hello! I am using Stripe Pay to process registration payments for the site I'm working on. The registration workflow is as follows:

User fills out registration form -> On submit, they are taken to the Stripe checkout page -> On payment success, they are redirected back to the Drupal site.

When the redirect is triggered, I get this error:
Error: Class "Drupal\stripe_pay\Controller\TrustedRedirectResponse" not found in Drupal\stripe_pay\Controller\StripeController->paymentSuccess() (line 232 of /code/web/modules/contrib/stripe_pay/src/Controller/StripeController.php).

Adding the TrustedRedirectResponse use statement to the file is all that's required.

🐛 Bug report
Status

Active

Version

1.2

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024