0

Facing this issue:

1 exception(s): Exception #0 (ReflectionException): Class mygateway does not exist

Don't know where I find this class in my module Please help.

Here's my code:

/home1/dukaania/public_html/testing2/app/code/Myname/Mygateway/etc/config.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
    <default>
        <payment>
            <mygateway>
                <debug>1</debug>
                <active>0</active>
                <model>mygateway/standard</model>
                <merchant_gateway_key backend_model="Magento\Config\Model\Config\Backend\Encrypted" />
                <order_status>pending</order_status>
                <title>My Gateway</title>
                <payment_action>sale</payment_action>
                <allowspecific>0</allowspecific>
                <sort_order>1</sort_order>
                <currency>Darham</currency>
                <debugReplaceKeys>MERCHANT_KEY</debugReplaceKeys>
                <paymentInfoKeys>FRAUD_MSG_LIST</paymentInfoKeys>
                <privateInfoKeys>FRAUD_MSG_LIST</privateInfoKeys>
                <frontName>mygateway</frontName>
                <helpers>Myname_Mygateway_Helper</helpers>
                <models>Myname_Mygateway_Model</models>
                <blocks>Myname_Mygateway_Block </blocks>
            </mygateway> 
      </payment>
    </default>
</config>
0

1 Answer 1

0

Issues like the one you mentioned can have several reasons. The following command sequence will check the dependencies and regenerates the code.

Remove generated code pieces to make sure we have a clean workspace

rm -rf var/cache/* var/di/* var/generation/* var/page_cache/* var/view_preprocessed/* pub/static/frontend/* vendor

Install composer dependencies

composer install

Compile DI Classes

php bin/magento setup:di:compile

Compile Static Files

php bin/magento setup:static-content:deploy

Set Permissions

chmod -R www-data:www-data && find app/code pub/static app/etc var/generation var/di var/view_preprocessed vendor ( -type f -or -type d ) -exec chmod u-w {} \; && chmod o-rwx app/etc/env.php && chmod u+x bin/magento

I hope it will help to solve your problem.

12
  • repo.magento.com) username: where I got this username ???? Oct 11, 2018 at 11:01
  • It is your magento.com account. Oct 11, 2018 at 11:03
  • how can i revert back it any command ? Oct 11, 2018 at 11:14
  • i purchased my theme from envato i dont know username and password and my site is locked need composer install to run but i dint know username and passsword please help Oct 11, 2018 at 11:16
  • What does mean by revert back? you can stop command execution by ctrl + c Oct 11, 2018 at 11:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.