sonata-project / ecommerce

[Abandoned] E-Commerce solution provided by Sonata
https://sonata-project.org
MIT License
165 stars 139 forks source link

Debug payment method does not work. #532

Closed gunesay closed 6 years ago

gunesay commented 6 years ago

Environment

Sonata packages

sonata-project/admin-bundle              3.32.0             3.33.0             The missing Symfony Admin Generator
sonata-project/block-bundle              3.12.0             3.12.1             Symfony SonataBlockBundle
sonata-project/cache                     2.0.1              2.0.1              Cache library
sonata-project/classification-bundle     3.6.1              3.6.1              Symfony SonataClassificationBundle
sonata-project/comment-bundle            3.1.0              3.1.0              Integrate the FOSCommentBundle in the Sonata Project
sonata-project/core-bundle               3.9.1              3.9.1              Symfony SonataCoreBundle
sonata-project/datagrid-bundle           2.3.1              2.3.1              Symfony SonataDatagridBundle
sonata-project/doctrine-extensions       1.0.2              1.0.2              Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 3.4.2              3.4.2              Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/easy-extends-bundle       2.5.0              2.5.0              Symfony SonataEasyExtendsBundle
sonata-project/ecommerce                 dev-master f11295b dev-master 0721418 E-Commerce solution provided by Sonata
sonata-project/exporter                  1.8.0              1.8.0              Lightweight Exporter library
sonata-project/formatter-bundle          3.4.1              3.4.1              Symfony SonataFormatterBundle
sonata-project/intl-bundle               2.4.0              2.4.0              Symfony SonataIntlBundle
sonata-project/media-bundle              3.11.0             3.11.0             Symfony SonataMediaBundle
sonata-project/notification-bundle       3.4.0              3.4.0              Symfony SonataNotificationBundle
sonata-project/seo-bundle                2.5.1              2.5.1              Symfony SonataSeoBundle
sonata-project/user-bundle               4.1.1              4.1.1              Symfony SonataUserBundle

Symfony packages

symfony/assetic-bundle     v2.8.2 v2.8.2 Integrates Assetic into Symfony2
symfony/monolog-bundle     v3.2.0 v3.2.0 Symfony MonologBundle
symfony/phpunit-bridge     v3.4.6 v4.0.6 Symfony PHPUnit Bridge
symfony/polyfill-apcu      v1.7.0 v1.7.0 Symfony polyfill backporting apcu_* functions to lower PHP versions
symfony/polyfill-intl-icu  v1.7.0 v1.7.0 Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-mbstring  v1.7.0 v1.7.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php56     v1.7.0 v1.7.0 Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
symfony/polyfill-php70     v1.7.0 v1.7.0 Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions
symfony/polyfill-util      v1.7.0 v1.7.0 Symfony utilities for portability of PHP codes
symfony/security-acl       v3.0.1 v3.0.1 Symfony Security Component - ACL (Access Control List)
symfony/swiftmailer-bundle v2.6.7 v3.2.1 Symfony SwiftmailerBundle
symfony/symfony            v3.4.6 v4.0.6 The Symfony PHP framework

PHP version

PHP 7.1.14 (cli) (built: Feb  2 2018 08:42:59) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies

Subject

After debug payment method is chosen and process to payment button is clicked, the following error is obtained:

Unable to generate a URL for the named route "sonata_payment_debug" as such route does not exist.

PS: I have cleared the cache and checked it. Again, it does not work.

Steps to reproduce

Just install ecommerce bundle.

Expected results

It should work without error.

Actual results

Symfony\Component\Routing\Exception\RouteNotFoundException:
Unable to generate a URL for the named route "sonata_payment_debug" as such route does not exist.

  at var/cache/dev/appDevDebugProjectContainerUrlGenerator.php:364
  at appDevDebugProjectContainerUrlGenerator->generate('sonata_payment_debug', array('check' => '8e14f549a86aa6f47e5742067d714c65f0ae06c5', 'reference' => '180328000002'), 1)
     (vendor/symfony/symfony/src/Symfony/Component/Routing/Router.php:240)
  at Symfony\Component\Routing\Router->generate('sonata_payment_debug', array('check' => '8e14f549a86aa6f47e5742067d714c65f0ae06c5', 'reference' => '180328000002'))
     (vendor/sonata-project/ecommerce/src/Component/Payment/Debug/DebugPayment.php:37)
  at Sonata\Component\Payment\Debug\DebugPayment->sendbank(object(Order))
     (vendor/sonata-project/ecommerce/src/PaymentBundle/Controller/PaymentController.php:119)
  at Sonata\PaymentBundle\Controller\PaymentController->sendbankAction()
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 2)
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 2)
     (vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php:106)
  at Symfony\Bundle\FrameworkBundle\Controller\Controller->forward('SonataPaymentBundle:Payment:sendbank')
     (vendor/sonata-project/ecommerce/src/BasketBundle/Controller/BasketController.php:493)
  at Sonata\BasketBundle\Controller\BasketController->finalReviewStepAction()
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (web/app_dev.php:29)
  at require('/Users/adflab/PhpstormProjects/Ordino_v12/web/app_dev.php')
     (vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Resources/router.php:42)
gunesay commented 6 years ago

Ok. It is my fault. I forgot to update routing file.

Add the following code to routing_dev.yml:

sonata_payment_debug:
    resource: '@SonataPaymentBundle/Resources/config/routing/payment_debug.xml'
    prefix:   /shop/payment/debug