Forums
I am using Opigno 3.0.4 with PHP 7.4. I enabled Commerce Paypal and when trying to add a new Paypal checkout gateway I get the following error:
Error: Class 'Sainsburys\Guzzle\Oauth2\GrantType\ClientCredentials' not found in include() (line 12 of /opt/lms/html/web/modules/contrib/commerce_paypal/src/ClientCredentials.php)
0 /opt/lms/html/vendor/composer/ClassLoader.php(478): include()
1 /opt/lms/html/vendor/composer/ClassLoader.php(346): Composer\Autoload\includeFile()
2 [internal function]: Composer\Autoload\ClassLoader->loadClass()
3 /opt/lms/html/web/modules/contrib/commerce_paypal/src/CheckoutSdkFactory.php(149): spl_autoload_call()
4 /opt/lms/html/web/modules/contrib/commerce_paypal/src/CheckoutSdkFactory.php(109): Drupal\commerce_paypal\CheckoutSdkFactory->getClient()
5 /opt/lms/html/web/modules/contrib/commerce_paypal/src/Plugin/Commerce/PaymentGateway/Checkout.php(340): Drupal\commerce_paypal\CheckoutSdkFactory->get()
6 /opt/lms/html/web/modules/contrib/commerce/src/Plugin/Commerce/InlineForm/PluginConfiguration.php(116): Drupal\commerce_paypal\Plugin\Commerce\PaymentGateway\Checkout->validateConfigurationForm()
7 /opt/lms/html/web/modules/contrib/commerce/src/Plugin/Commerce/InlineForm/InlineFormBase.php(144): Drupal\commerce\Plugin\Commerce\InlineForm\PluginConfiguration->validateInlineForm()
8 [internal function]: Drupal\commerce\Plugin\Commerce\InlineForm\InlineFormBase::runValidate()
9 /opt/lms/html/web/core/lib/Drupal/Core/Form/FormValidator.php(282): call_user_func_array()
10 /opt/lms/html/web/core/lib/Drupal/Core/Form/FormValidator.php(238): Drupal\Core\Form\FormValidator->doValidateForm()
11 /opt/lms/html/web/core/lib/Drupal/Core/Form/FormValidator.php(118): Drupal\Core\Form\FormValidator->doValidateForm()
12 /opt/lms/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(588): Drupal\Core\Form\FormValidator->validateForm()
13 /opt/lms/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(320): Drupal\Core\Form\FormBuilder->processForm()
14 /opt/lms/html/web/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
15 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
16 /opt/lms/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
17 /opt/lms/html/web/core/lib/Drupal/Core/Render/Renderer.php(564): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}()
18 /opt/lms/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
19 /opt/lms/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
20 /opt/lms/html/vendor/symfony/http-kernel/HttpKernel.php(158): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}()
21 /opt/lms/html/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
22 /opt/lms/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
23 /opt/lms/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
24 /opt/lms/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
25 /opt/lms/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
26 /opt/lms/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
27 /opt/lms/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
28 /opt/lms/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
29 /opt/lms/html/web/core/lib/Drupal/Core/DrupalKernel.php(708): Stack\StackedHttpKernel->handle()
30 /opt/lms/html/web/index.php(19): Drupal\Core\DrupalKernel->handle()
31
Any solution for this.
Thanks