yoomoney / cms-drupal8

YooKassa payment module for Drupal 8.x
https://yookassa.ru/developers
3 stars 6 forks source link

Undefined array key "second_receipt_enabled" #30

Open superromeo opened 2 years ago

superromeo commented 2 years ago

У меня флажок Отправлять второй чек не поставлен. Выходит предупреждение:

Место | /checkout/12299/payment Источник отсылки | /checkout/12299/order_information Warning: Undefined array key "second_receipt_enabled" в Drupal\yookassa\EventSubscriber\YooKassaEventSubscriber->onSendSecondReceipt() (строка 112 из /DATA/home-sites/lom/web/modules/contrib/commerce_yookassa/src/EventSubscriber/YooKassaEventSubscriber.php)

0 /DATA/home-sites/lom/web/core/includes/bootstrap.inc(346): _drupal_error_handler_real(2, 'Undefined array...', '/DATA/home-site...', 112)

1 /DATA/home-sites/lom/web/modules/contrib/commerce_yookassa/src/EventSubscriber/YooKassaEventSubscriber.php(112): _drupal_error_handler(2, 'Undefined array...', '/DATA/home-site...', 112)

2 [internal function]: Drupal\yookassa\EventSubscriber\YooKassaEventSubscriber->onSendSecondReceipt(Object(Drupal\commerce_order\Event\OrderEvent), 'commerce_order....', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))

3 /DATA/home-sites/lom/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func(Array, Object(Drupal\commerce_order\Event\OrderEvent), 'commerce_order....', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))

4 /DATA/home-sites/lom/web/modules/contrib/commerce/src/CommerceContentEntityStorage.php(60): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Drupal\commerce_order\Event\OrderEvent), 'commerce_order....')

5 /DATA/home-sites/lom/web/modules/contrib/commerce/modules/order/src/OrderStorage.php(64): Drupal\commerce\CommerceContentEntityStorage->invokeHook('presave', Object(Drupal\commerce_order\Entity\Order))

6 /DATA/home-sites/lom/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(567): Drupal\commerce_order\OrderStorage->invokeHook('presave', Object(Drupal\commerce_order\Entity\Order))

7 /DATA/home-sites/lom/web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(750): Drupal\Core\Entity\EntityStorageBase->doPreSave(Object(Drupal\commerce_order\Entity\Order))

8 /DATA/home-sites/lom/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(521): Drupal\Core\Entity\ContentEntityStorageBase->doPreSave(Object(Drupal\commerce_order\Entity\Order))

9 /DATA/home-sites/lom/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(802): Drupal\Core\Entity\EntityStorageBase->save(Object(Drupal\commerce_order\Entity\Order))

10 /DATA/home-sites/lom/web/core/lib/Drupal/Core/Entity/EntityBase.php(339): Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object(Drupal\commerce_order\Entity\Order))

11 /DATA/home-sites/lom/web/modules/contrib/commerce/modules/checkout/src/Plugin/Commerce/CheckoutFlow/CheckoutFlowBase.php(198): Drupal\Core\Entity\EntityBase->save()

12 /DATA/home-sites/lom/web/modules/contrib/commerce/modules/payment/src/Plugin/Commerce/CheckoutPane/PaymentProcess.php(232): Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow\CheckoutFlowBase->redirectToStep('complete')

13 /DATA/home-sites/lom/web/modules/contrib/commerce/modules/checkout/src/Plugin/Commerce/CheckoutFlow/CheckoutFlowWithPanesBase.php(546): Drupal\commerce_payment\Plugin\Commerce\CheckoutPane\PaymentProcess->buildPaneForm(Array, Object(Drupal\Core\Form\FormState), Array)

14 [internal function]: Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow\CheckoutFlowWithPanesBase->buildForm(Array, Object(Drupal\Core\Form\FormState), 'payment')

15 /DATA/home-sites/lom/web/core/lib/Drupal/Core/Form/FormBuilder.php(531): call_user_func_array(Array, Array)

16 /DATA/home-sites/lom/web/core/lib/Drupal/Core/Form/FormBuilder.php(278): Drupal\Core\Form\FormBuilder->retrieveForm('commerce_checko...', Object(Drupal\Core\Form\FormState))

17 /DATA/home-sites/lom/web/core/lib/Drupal/Core/Form/FormBuilder.php(219): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow\MultistepDefault), Object(Drupal\Core\Form\FormState))

18 /DATA/home-sites/lom/web/modules/contrib/commerce/modules/checkout/src/Controller/CheckoutController.php(143): Drupal\Core\Form\FormBuilder->getForm(Object(Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow\MultistepDefault), 'payment')

19 [internal function]: Drupal\commerce_checkout\Controller\CheckoutController->formPage(Object(Drupal\Core\Routing\RouteMatch))

20 /DATA/home-sites/lom/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)

21 /DATA/home-sites/lom/web/core/lib/Drupal/Core/Render/Renderer.php(564): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}()

22 /DATA/home-sites/lom/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))

23 /DATA/home-sites/lom/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)

24 /DATA/home-sites/lom/vendor/symfony/http-kernel/HttpKernel.php(158): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}()

25 /DATA/home-sites/lom/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)

26 /DATA/home-sites/lom/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)

27 /DATA/home-sites/lom/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)

28 /DATA/home-sites/lom/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)

29 /DATA/home-sites/lom/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)

30 /DATA/home-sites/lom/web/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)

31 /DATA/home-sites/lom/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)

32 /DATA/home-sites/lom/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)

33 /DATA/home-sites/lom/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)

34 /DATA/home-sites/lom/web/core/lib/Drupal/Core/DrupalKernel.php(708): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)

35 /DATA/home-sites/lom/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))

36 {main}

.

ostulov commented 2 years ago

Спасибо, проверим!

ostulov commented 2 years ago

Выложили исправление в версии 2.2.6