Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension using code that was removed from the core in Magento 2.4.0 #12

Open
yborges opened this issue Sep 25, 2020 · 1 comment
Open

Comments

@yborges
Copy link

yborges commented Sep 25, 2020

Opening the page Stores->Configuration->Sales->Payment Methods I get the following error:

1 exception(s):
Exception #0 (ReflectionException): Class Magento\Authorizenet\Model\Source\PaymentAction does not exist

Exception #0 (ReflectionException): Class Magento\Authorizenet\Model\Source\PaymentAction does not exist
<pre>#1 Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\Authoriz...') called at [vendor/magento/framework/ObjectManager/Definition/Runtime.php:54]
#2 Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Magento\Authoriz...') called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:100]
#3 Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\Authoriz...') called at [vendor/magento/framework/ObjectManager/ObjectManager.php:70]
#4 Magento\Framework\ObjectManager\ObjectManager->get('Magento\Authoriz...') called at [vendor/magento/module-config/Model/Config/SourceFactory.php:37]
#5 Magento\Config\Model\Config\SourceFactory->create('Magento\Authoriz...') called at [vendor/magento/module-config/Model/Config/Structure/Element/Field.php:443]
#6 Magento\Config\Model\Config\Structure\Element\Field->_getOptionsFromSourceModel('Magento\Authoriz...') called at [vendor/magento/module-config/Model/Config/Structure/Element/Field.php:379]
#7 Magento\Config\Model\Config\Structure\Element\Field->getOptions() called at [vendor/magento/module-config/Block/System/Config/Form.php:394]
#8 Magento\Config\Block\System\Config\Form->_initElement(&Magento\Config\Model\Config\Structure\Element\Field\Interceptor#000000000d46a2df00000000691fd73a#, &Magento\Framework\Data\Form\Element\Fieldset#000000000d46b59500000000691fd73a#, 'payment/az2009_c...', '', '') called at [vendor/magento/module-config/Block/System/Config/Form.php:316]
#9 Magento\Config\Block\System\Config\Form->initFields(&Magento\Framework\Data\Form\Element\Fieldset#000000000d46b59500000000691fd73a#, &Magento\Config\Model\Config\Structure\Element\Group\Proxy#000000000d46a04900000000691fd73a#, &Magento\Config\Model\Config\Structure\Element\Section#000000000d46a49b00000000691fd73a#) called at [vendor/magento/module-config/Block/System/Config/Form.php:256]
#10 Magento\Config\Block\System\Config\Form->_initGroup(&Magento\Config\Model\Config\Structure\Element\Group\Proxy#000000000d46a04900000000691fd73a#, &Magento\Config\Model\Config\Structure\Element\Section#000000000d46a49b00000000691fd73a#, &Magento\Framework\Data\Form\Element\Fieldset#000000000d46af5100000000691fd73a#) called at [vendor/magento/module-config/Block/System/Config/Form.php:302]
#11 Magento\Config\Block\System\Config\Form->initFields(&Magento\Framework\Data\Form\Element\Fieldset#000000000d46af5100000000691fd73a#, &Magento\Config\Model\Config\Structure\Element\Group\Interceptor#000000000d46a4ef00000000691fd73a#, &Magento\Config\Model\Config\Structure\Element\Section#000000000d46a49b00000000691fd73a#) called at [vendor/magento/module-config/Block/System/Config/Form.php:256]
#12 Magento\Config\Block\System\Config\Form->_initGroup(&Magento\Config\Model\Config\Structure\Element\Group\Interceptor#000000000d46a4ef00000000691fd73a#, &Magento\Config\Model\Config\Structure\Element\Section#000000000d46a49b00000000691fd73a#, &Magento\Framework\Data\Form#000000000d46a98500000000691fd73a#) called at [vendor/magento/module-config/Block/System/Config/Form.php:202]
#13 Magento\Config\Block\System\Config\Form->initForm() called at [vendor/magento/module-config/Block/System/Config/Form.php:542]
#14 Magento\Config\Block\System\Config\Form->_beforeToHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1110]
#15 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1115]
#16 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:675]
#17 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [vendor/magento/framework/View/Layout.php:566]
#18 Magento\Framework\View\Layout->_renderBlock('system\config\fo...') called at [vendor/magento/framework/View/Layout.php:542]
#19 Magento\Framework\View\Layout->renderNonCachedElement('system\config\fo...') called at [vendor/magento/framework/View/Layout.php:497]
#20 Magento\Framework\View\Layout->renderElement('system\config\fo...', true) called at [vendor/magento/framework/View/Element/AbstractBlock.php:522]
#21 Magento\Framework\View\Element\AbstractBlock->getChildHtml('form') called at [vendor/magento/module-config/view/adminhtml/templates/system/config/edit.phtml:32]
#22 include('/var/www/queroca...') called at [vendor/magento/framework/View/TemplateEngine/Php.php:71]
#23 Magento\Framework\View\TemplateEngine\Php->render(&Magento\Config\Block\System\Config\Edit#000000000d46a70000000000691fd73a#, '/var/www/queroca...', array('csp' => &Magento\Csp\Api\InlineUtilInterface\Proxy#000000000d46a69900000000691fd73a#, 'secureRenderer' => &Magento\Framework\View\Helper\SecureHtmlRenderer\Proxy#000000000d46a69b00000000691fd73a#, 'escaper' => &Magento\Framework\Escaper#000000000d46a3d500000000691fd73a#)) called at [vendor/magento/framework/View/Element/Template.php:273]
#24 Magento\Framework\View\Element\Template->fetchView('/var/www/queroca...') called at [vendor/magento/framework/View/Element/Template.php:303]
#25 Magento\Framework\View\Element\Template->_toHtml() called at [vendor/magento/module-backend/Block/Template.php:141]
#26 Magento\Backend\Block\Template->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1111]
#27 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1115]
#28 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:675]
#29 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [vendor/magento/framework/View/Layout.php:566]
#30 Magento\Framework\View\Layout->_renderBlock('system.config.ed...') called at [vendor/magento/framework/View/Layout.php:542]
#31 Magento\Framework\View\Layout->renderNonCachedElement('system.config.ed...') called at [vendor/magento/framework/View/Layout.php:497]
#32 Magento\Framework\View\Layout->renderElement('system.config.ed...', false) called at [vendor/magento/framework/View/Layout.php:594]
#33 Magento\Framework\View\Layout->_renderContainer('content', false) called at [vendor/magento/framework/View/Layout.php:544]
#34 Magento\Framework\View\Layout->renderNonCachedElement('content') called at [vendor/magento/framework/View/Layout.php:497]
#35 Magento\Framework\View\Layout->renderElement('content', false) called at [vendor/magento/framework/View/Layout.php:594]
#36 Magento\Framework\View\Layout->_renderContainer('admin.scope.col....', false) called at [vendor/magento/framework/View/Layout.php:544]
#37 Magento\Framework\View\Layout->renderNonCachedElement('admin.scope.col....') called at [vendor/magento/framework/View/Layout.php:497]
#38 Magento\Framework\View\Layout->renderElement('admin.scope.col....', false) called at [vendor/magento/framework/View/Layout.php:594]
#39 Magento\Framework\View\Layout->_renderContainer('main.col', false) called at [vendor/magento/framework/View/Layout.php:544]
#40 Magento\Framework\View\Layout->renderNonCachedElement('main.col') called at [vendor/magento/framework/View/Layout.php:497]
#41 Magento\Framework\View\Layout->renderElement('main.col', false) called at [vendor/magento/framework/View/Layout.php:594]
#42 Magento\Framework\View\Layout->_renderContainer('page.main.contai...', false) called at [vendor/magento/framework/View/Layout.php:544]
#43 Magento\Framework\View\Layout->renderNonCachedElement('page.main.contai...') called at [vendor/magento/framework/View/Layout.php:497]
#44 Magento\Framework\View\Layout->renderElement('page.main.contai...', false) called at [vendor/magento/framework/View/Layout.php:594]
#45 Magento\Framework\View\Layout->_renderContainer('page.content', false) called at [vendor/magento/framework/View/Layout.php:544]
#46 Magento\Framework\View\Layout->renderNonCachedElement('page.content') called at [vendor/magento/framework/View/Layout.php:497]
#47 Magento\Framework\View\Layout->renderElement('page.content', false) called at [vendor/magento/framework/View/Layout.php:594]
#48 Magento\Framework\View\Layout->_renderContainer('page.wrapper', false) called at [vendor/magento/framework/View/Layout.php:544]
#49 Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper') called at [vendor/magento/framework/View/Layout.php:497]
#50 Magento\Framework\View\Layout->renderElement('page.wrapper', false) called at [vendor/magento/framework/View/Layout.php:594]
#51 Magento\Framework\View\Layout->_renderContainer('backend.page', false) called at [vendor/magento/framework/View/Layout.php:544]
#52 Magento\Framework\View\Layout->renderNonCachedElement('backend.page') called at [vendor/magento/framework/View/Layout.php:497]
#53 Magento\Framework\View\Layout->renderElement('backend.page', false) called at [vendor/magento/framework/View/Layout.php:594]
#54 Magento\Framework\View\Layout->_renderContainer('root', false) called at [vendor/magento/framework/View/Layout.php:544]
#55 Magento\Framework\View\Layout->renderNonCachedElement('root') called at [vendor/magento/framework/View/Layout.php:497]
#56 Magento\Framework\View\Layout->renderElement('root') called at [vendor/magento/framework/View/Layout.php:963]
#57 Magento\Framework\View\Layout->getOutput() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:50]
#58 Magento\Framework\View\Layout\Interceptor->getOutput() called at [vendor/magento/framework/View/Result/Page.php:258]
#59 Magento\Framework\View\Result\Page->render(&Magento\Framework\App\Response\Http\Interceptor#000000000d46a1f500000000691fd73a#) called at [vendor/magento/framework/View/Result/Layout.php:171]
#60 Magento\Framework\View\Result\Layout->renderResult(&Magento\Framework\App\Response\Http\Interceptor#000000000d46a1f500000000691fd73a#) called at [generated/code/Magento/Backend/Model/View/Result/Page/Interceptor.php:24]
#61 Magento\Backend\Model\View\Result\Page\Interceptor->renderResult(&Magento\Framework\App\Response\Http\Interceptor#000000000d46a1f500000000691fd73a#) called at [vendor/magento/framework/App/Http.php:120]
#62 Magento\Framework\App\Http->launch() called at [vendor/magento/framework/App/Bootstrap.php:263]
#63 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#000000000d46a1eb00000000691fd73a#) called at [index.php:39]
</pre>

The class indeed doesn't exist for version 2.4.0 as it was stated in the release notes:

With this release, the Authorize.Net method integration has been removed from core code. Merchants should migrate to the official extension that is available on the Magento Marketplace.

Attempting to install the extension Authorize.net doesn't work either:

composer require authorizenet/magento-module-authorizenet:1.0.1

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - magento/module-vault 101.0.0 requires php 7.0.2|7.0.4|~7.0.6|~7.1.0 -> your PHP version (7.3.19) does not satisfy that requirement.
    - magento/module-vault 101.0.1 requires php 7.0.2|7.0.4|~7.0.6|~7.1.0 -> your PHP version (7.3.19) does not satisfy that requirement.
    - magento/module-vault 101.0.2 requires php 7.0.2|7.0.4|~7.0.6|~7.1.0 -> your PHP version (7.3.19) does not satisfy that requirement.
    - magento/module-vault 101.0.3 requires php ~7.0.13|~7.1.0 -> your PHP version (7.3.19) does not satisfy that requirement.
    - magento/module-vault 101.0.4 requires php ~7.0.13|~7.1.0 -> your PHP version (7.3.19) does not satisfy that requirement.
    - magento/module-vault 101.0.5 requires php ~7.0.13|~7.1.0 -> your PHP version (7.3.19) does not satisfy that requirement.
    - magento/module-vault 101.0.6 requires php ~7.0.13|~7.1.0 -> your PHP version (7.3.19) does not satisfy that requirement.
    - magento/module-vault 101.0.7 requires php ~7.0.13|~7.1.0|~7.2.0 -> your PHP version (7.3.19) does not satisfy that requirement.
    - magento/module-vault 101.0.8 requires php ~7.0.13||~7.1.0||~7.2.0 -> your PHP version (7.3.19) does not satisfy that requirement.
    - magento/module-vault 101.1.0 requires php ~7.1.3||~7.2.0 -> your PHP version (7.3.19) does not satisfy that requirement.
    - magento/module-vault 101.1.1 requires php ~7.1.3||~7.2.0 -> your PHP version (7.3.19) does not satisfy that requirement.
    - magento/module-vault 101.1.2 requires php ~7.1.3||~7.2.0 -> your PHP version (7.3.19) does not satisfy that requirement.
    - magento/framework 102.0.0 requires php ~7.1.3||~7.2.0 -> your PHP version (7.3.19) does not satisfy that requirement.
    - magento/framework 102.0.1 requires php ~7.1.3||~7.2.0 -> your PHP version (7.3.19) does not satisfy that requirement.
    - magento/framework 102.0.2 requires php ~7.1.3||~7.2.0 -> your PHP version (7.3.19) does not satisfy that requirement.
    - magento/framework 102.0.2-p2 requires php ~7.1.3||~7.2.0 -> your PHP version (7.3.19) does not satisfy that requirement.
    - authorizenet/magento-module-authorizenet 1.0.1 requires authorizenet/magento-module-creditcard 1.0.1 -> satisfiable by authorizenet/magento-module-creditcard[1.0.1].
    - Installation request for authorizenet/magento-module-authorizenet 1.0.1 -> satisfiable by authorizenet/magento-module-authorizenet[1.0.1].
    - Conclusion: remove laminas/laminas-code 3.4.1
    - Conclusion: don't install laminas/laminas-code 3.4.1
    - authorizenet/magento-module-creditcard 1.0.1 requires magento/module-vault 101.0.*|101.1.* -> satisfiable by magento/module-vault[101.1.4-p2, 101.1.5, 101.1.4, 101.0.8, 101.0.7, 101.1.3, 101.0.6, 101.1.2, 101.1.1, 101.1.0, 101.0.5, 101.0.4, 101.0.3, 101.0.2, 101.0.1, 101.0.0].
    - magento/module-vault 101.1.4-p2 requires magento/framework 102.0.* -> satisfiable by magento/framework[102.0.5-p2, 102.0.4-p2, 102.0.5, 102.0.3-p1, 102.0.4, 102.0.2-p2, 102.0.3, 102.0.2, 102.0.1, 102.0.0].
    - magento/module-vault 101.1.5 requires magento/framework 102.0.* -> satisfiable by magento/framework[102.0.5-p2, 102.0.4-p2, 102.0.5, 102.0.3-p1, 102.0.4, 102.0.2-p2, 102.0.3, 102.0.2, 102.0.1, 102.0.0].
    - magento/module-vault 101.1.4 requires magento/framework 102.0.* -> satisfiable by magento/framework[102.0.5-p2, 102.0.4-p2, 102.0.5, 102.0.3-p1, 102.0.4, 102.0.2-p2, 102.0.3, 102.0.2, 102.0.1, 102.0.0].
    - magento/module-vault 101.1.3 requires magento/framework 102.0.* -> satisfiable by magento/framework[102.0.5-p2, 102.0.4-p2, 102.0.5, 102.0.3-p1, 102.0.4, 102.0.2-p2, 102.0.3, 102.0.2, 102.0.1, 102.0.0].
    - magento/framework 102.0.5-p2 requires laminas/laminas-code ~3.3.0 -> satisfiable by laminas/laminas-code[3.3.0, 3.3.1, 3.3.2].
    - magento/framework 102.0.4-p2 requires zendframework/zend-code ~3.3.0 -> satisfiable by laminas/laminas-code[3.3.0, 3.3.1, 3.3.2], zendframework/zend-code[3.3.0, 3.3.1, 3.3.2].
    - magento/framework 102.0.5 requires laminas/laminas-code ~3.3.0 -> satisfiable by laminas/laminas-code[3.3.0, 3.3.1, 3.3.2].
    - magento/framework 102.0.3-p1 requires zendframework/zend-code ~3.3.0 -> satisfiable by laminas/laminas-code[3.3.0, 3.3.1, 3.3.2], zendframework/zend-code[3.3.0, 3.3.1, 3.3.2].
    - magento/framework 102.0.4 requires zendframework/zend-code ~3.3.0 -> satisfiable by laminas/laminas-code[3.3.0, 3.3.1, 3.3.2], zendframework/zend-code[3.3.0, 3.3.1, 3.3.2].
    - magento/framework 102.0.3 requires zendframework/zend-code ~3.3.0 -> satisfiable by laminas/laminas-code[3.3.0, 3.3.1, 3.3.2], zendframework/zend-code[3.3.0, 3.3.1, 3.3.2].
    - Can only install one of: laminas/laminas-code[3.3.0, 3.4.1].
    - Can only install one of: laminas/laminas-code[3.3.1, 3.4.1].
    - Can only install one of: laminas/laminas-code[3.3.2, 3.4.1].
    - don't install zendframework/zend-code 3.3.0|don't install laminas/laminas-code 3.4.1
    - don't install zendframework/zend-code 3.3.1|don't install laminas/laminas-code 3.4.1
    - don't install zendframework/zend-code 3.3.2|don't install laminas/laminas-code 3.4.1
    - Installation request for laminas/laminas-code (locked at 3.4.1) -> satisfiable by laminas/laminas-code[3.4.1].

A similar issue is described for another extension (dealer4dealer.nl) and it seems to be related to a different authentication process in 2.4.0 that even Authorize.net isn't ready for:

Apart from the issue above, Magento 2.4 isn't supported yet when using the xCore. It requires a different authentication method for the API using an integration token because of the mandatory 2FA. The issue for this and support for Magento 2.4 overall is on our current sprint which means it will be developed, tested and released within the next three weeks.

For the purposes of az2009/cielo from Magento 2.4.0 on this extension needs to stop using:
Magento\Authorizenet\Model\Source\PaymentAction
in etc/adminhtml/system.xml

                <field id="payment_action" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Payment Action</label>
                    <source_model>Magento\Authorizenet\Model\Source\PaymentAction</source_model>
                    <depends>
                        <field id="active">1</field>
                    </depends>
                </field>
@yborges yborges changed the title Application using methods that were removed from the core code Extension using methods that were removed from the core code in Magento 2.4.0 Sep 25, 2020
@yborges yborges changed the title Extension using methods that were removed from the core code in Magento 2.4.0 Extension using code that was removed from the core in Magento 2.4.0 Sep 25, 2020
@vijayrami
Copy link

Check any custom module which uses Magento\Authorizenet\Model\Source\PaymentAction as a source_model in etc/adminhtml/system.xml

I have it in TNW/AuthorizeCim custom module.
I have disabled this module and its working.

You can also check Magento\Authorizenet\Model\Source\PaymentAction in eav_attribute table.

Might be it will help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants