QuickPay / magento-v2

Open Software License 3.0
5 stars 20 forks source link

getCountryID() - Can't purchase virtual products #38

Closed kasperth closed 1 year ago

kasperth commented 1 year ago

Description

It's not possible to purchase Virtual products using any QuickPay payment method. Seems like something has been introduced from version 2.3.4 to 2.3.6, as we're unable to reproduce on this older version.

Preconditions

Steps to reproduce

  1. Set up the QuickPay module with credentials etc.
  2. Create a virtual product from the backend.
  3. Add the product to the basket, go to checkout, and choose any QuickPay payment (Card, MobilePay, ViaBill etc.)
  4. Purchase the order

Expected result

Success Page with order confirmation.

Actual result

Error page with the following error:

main.CRITICAL: Error: Call to a member function getCountryId() on null in /var/www/shop.prod/public_html/vendor/quickpay/magento2/Model/Adapter/QuickPayAdapter.php:190
Stack trace:
#0 /var/www/shop.prod/public_html/vendor/quickpay/magento2/Controller/Payment/Redirect.php(89): QuickPay\Gateway\Model\Adapter\QuickPayAdapter->CreatePaymentLink()
#1 /var/www/shop.prod/public_html/vendor/magento/framework/Interception/Interceptor.php(58): QuickPay\Gateway\Controller\Payment\Redirect->execute()
#2 /var/www/shop.prod/public_html/vendor/magento/framework/Interception/Interceptor.php(138): QuickPay\Gateway\Controller\Payment\Redirect\Interceptor->___callParent()
#3 /var/www/shop.prod/public_html/vendor/magento/framework/Interception/Interceptor.php(153): QuickPay\Gateway\Controller\Payment\Redirect\Interceptor->Magento\Framework\Interception\{closure}()
#4 /var/www/shop.prod/public_html/generated/code/QuickPay/Gateway/Controller/Payment/Redirect/Interceptor.php(23): QuickPay\Gateway\Controller\Payment\Redirect\Interceptor->___callPlugins()
#5 /var/www/shop.prod/public_html/vendor/magento/framework/App/Action/Action.php(111): QuickPay\Gateway\Controller\Payment\Redirect\Interceptor->execute()
#6 /var/www/shop.prod/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch()
#7 /var/www/shop.prod/public_html/vendor/magento/framework/Interception/Interceptor.php(138): QuickPay\Gateway\Controller\Payment\Redirect\Interceptor->___callParent()
#8 /var/www/shop.prod/public_html/vendor/salecto2/magento2-dev-toolbar/Model/App/FrontController/ToolbarPlugin.php(51): QuickPay\Gateway\Controller\Payment\Redirect\Interceptor->Magento\Framework\Interception\{closure}()
#9 /var/www/shop.prod/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Salecto\DevToolbar\Model\App\FrontController\ToolbarPlugin->aroundDispatch()
#10 /var/www/shop.prod/public_html/vendor/magento/framework/Interception/Interceptor.php(153): QuickPay\Gateway\Controller\Payment\Redirect\Interceptor->Magento\Framework\Interception\{closure}()
#11 /var/www/shop.prod/public_html/generated/code/QuickPay/Gateway/Controller/Payment/Redirect/Interceptor.php(32): QuickPay\Gateway\Controller\Payment\Redirect\Interceptor->___callPlugins()
#12 /var/www/shop.prod/public_html/vendor/magento/framework/App/FrontController.php(245): QuickPay\Gateway\Controller\Payment\Redirect\Interceptor->dispatch()
#13 /var/www/shop.prod/public_html/vendor/magento/framework/App/FrontController.php(212): Magento\Framework\App\FrontController->getActionResponse()
#14 /var/www/shop.prod/public_html/vendor/magento/framework/App/FrontController.php(147): Magento\Framework\App\FrontController->processRequest()
#15 /var/www/shop.prod/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch()
#16 /var/www/shop.prod/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent()
#17 /var/www/shop.prod/public_html/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(99): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#18 /var/www/shop.prod/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch()
#19 /var/www/shop.prod/public_html/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(71): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#20 /var/www/shop.prod/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch()
#21 /var/www/shop.prod/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#22 /var/www/shop.prod/public_html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins()
#23 /var/www/shop.prod/public_html/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch()
#24 /var/www/shop.prod/public_html/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http->launch()
#25 /var/www/shop.prod/public_html/pub/index.php(30): Magento\Framework\App\Bootstrap->run()
#26 {main} {"exception":"[object] (Error(code: 0): Call to a member function getCountryId() on null at /var/www/shop.prod/public_html/vendor/quickpay/magento2/Model/Adapter/QuickPayAdapter.php:190)"} []
ssandgren commented 1 year ago

@kasperth I get the same error. We will look at it, thank you for your input.

CodemakersDK commented 1 year ago

This is now fixed in v 2.3.7.