title: OpenCart 3. Fix Fatal error: Uncaught Error: Class 'Controllerextensionpaymentgcash' not found in storage\modification\system\engine\action.php:71
body: <p>I am create new extension payment gateway GCash on my OpenCart 3.0.3.3. I Copy the existing concept of Bank Transfer. But once I Install the new extension i encounter the error.</p>
  <blockquote>
  <p>Fatal error: Uncaught Error: Class 'Controllerextensionpaymentgcash' not found in C:\xampp\storage\chaguan\storage\modification\system\engine\action.php:71 Stack trace: #0 C:\xampp\storage\chaguan\storage\modification\system\engine\loader.php(48): Action-&gt;execute(Object(Registry), Array) #1 C:\xampp\htdocs\chaguan2\admin\controller\extension\extension\payment.php(27): Loader-&gt;controller('extension/payme...') #2 C:\xampp\storage\chaguan\storage\modification\system\engine\action.php(79): ControllerExtensionExtensionPayment-&gt;install() #3 C:\xampp\htdocs\chaguan2\admin\controller\startup\router.php(26): Action-&gt;execute(Object(Registry), Array) #4 C:\xampp\storage\chaguan\storage\modification\system\engine\action.php(79): ControllerStartupRouter-&gt;index() #5 C:\xampp\htdocs\chaguan2\system\engine\router.php(67): Action-&gt;execute(Object(Registry)) #6 C:\xampp\htdocs\chaguan2\system\engine\router.php(56): Router-&gt;execute(Object(Action)) #7 C:\xampp\htdocs\chaguan2\system\framework.php(165): Router-&gt;dispatch(Object(Action), Object( in C:\xampp\storage\chaguan\storage\modification\system\engine\action.php on line 71</p>
  </blockquote>
  <p>How can I resolve following errors?</p>
  <p>For reference this is my code:</p>
  <p><strong>Controller</strong>
  <strong>Path:</strong></p>
  <p><em>admin\controller\extension\payment\gcash.php</em></p>
  <pre><code>&lt;?php
  class ControllerExtensionGCash extends Controller {
      private $error = array();
  
      public function index() {
          $this-&gt;load-&gt;language('extension/payment/gcash');
  
          $this-&gt;document-&gt;setTitle($this-&gt;language-&gt;get('heading_title'));
  
          $this-&gt;load-&gt;model('setting/setting');
  
          if (($this-&gt;request-&gt;server['REQUEST_METHOD'] == 'POST') &amp;&amp; $this-&gt;validate()) {
              $this-&gt;model_setting_setting-&gt;editSetting('payment_gcash', $this-&gt;request-&gt;post);
  
              $this-&gt;session-&gt;data['success'] = $this-&gt;language-&gt;get('text_success');
  
              $this-&gt;response-&gt;redirect($this-&gt;url-&gt;link('marketplace/extension', 'user_token=' . $this-&gt;session-&gt;data['user_token'] . '&amp;type=payment', true));
          }
  
          if (isset($this-&gt;error['warning'])) {
              $data['error_warning'] = $this-&gt;error['warning'];
          } else {
              $data['error_warning'] = '';
          }
  
          if (isset($this-&gt;error['bank'])) {
              $data['error_bank'] = $this-&gt;error['bank'];
          } else {
              $data['error_bank'] = array();
          }
  
          $data['breadcrumbs'] = array();
  
          $data['breadcrumbs'][] = array(
              'text' =&gt; $this-&gt;language-&gt;get('text_home'),
              'href' =&gt; $this-&gt;url-&gt;link('common/dashboard', 'user_token=' . $this-&gt;session-&gt;data['user_token'], true)
          );
  
          $data['breadcrumbs'][] = array(
              'text' =&gt; $this-&gt;language-&gt;get('text_extension'),
              'href' =&gt; $this-&gt;url-&gt;link('marketplace/extension', 'user_token=' . $this-&gt;session-&gt;data['user_token'] . '&amp;type=payment', true)
          );
  
          $data['breadcrumbs'][] = array(
              'text' =&gt; $this-&gt;language-&gt;get('heading_title'),
              'href' =&gt; $this-&gt;url-&gt;link('extension/payment/gcash', 'user_token=' . $this-&gt;session-&gt;data['user_token'], true)
          );
  
          $data['action'] = $this-&gt;url-&gt;link('extension/payment/gcash', 'user_token=' . $this-&gt;session-&gt;data['user_token'], true);
  
          $data['cancel'] = $this-&gt;url-&gt;link('marketplace/extension', 'user_token=' . $this-&gt;session-&gt;data['user_token'] . '&amp;type=payment', true);
  
          $this-&gt;load-&gt;model('localisation/language');
  
          $data['payment_gcash'] = array();
  
          $languages = $this-&gt;model_localisation_language-&gt;getLanguages();
          
          foreach ($languages as $language) {
              if (isset($this-&gt;request-&gt;post['payment_gcash_info' . $language['language_id']])) {
                  $data['payment_gcash_info'][$language['language_id']] = $this-&gt;request-&gt;post['payment_gcash_info' . $language['language_id']];
              } else {
                  $data['payment_gcash_info'][$language['language_id']] = $this-&gt;config-&gt;get('payment_gcash_info' . $language['language_id']);
              }
          }
  
          $data['languages'] = $languages;
  
          if (isset($this-&gt;request-&gt;post['payment_gcash_total'])) {
              $data['payment_gcash_total'] = $this-&gt;request-&gt;post['payment_gcash_total'];
          } else {
              $data['payment_gcash_total'] = $this-&gt;config-&gt;get('payment_gcash_total');
          }
  
          if (isset($this-&gt;request-&gt;post['payment_gcash_order_status_id'])) {
              $data['payment_gcash_order_status_id'] = $this-&gt;request-&gt;post['payment_gcash_order_status_id'];
          } else {
              $data['payment_gcash_order_status_id'] = $this-&gt;config-&gt;get('payment_gcash_order_status_id');
          }
  
          $this-&gt;load-&gt;model('localisation/order_status');
  
          $data['order_statuses'] = $this-&gt;model_localisation_order_status-&gt;getOrderStatuses();
  
          if (isset($this-&gt;request-&gt;post['payment_gcash_geo_zone_id'])) {
              $data['payment_gcash_geo_zone_id'] = $this-&gt;request-&gt;post['payment_gcash_geo_zone_id'];
          } else {
              $data['payment_gcash_geo_zone_id'] = $this-&gt;config-&gt;get('payment_gcash_geo_zone_id');
          }
  
          $this-&gt;load-&gt;model('localisation/geo_zone');
  
          $data['geo_zones'] = $this-&gt;model_localisation_geo_zone-&gt;getGeoZones();
  
          if (isset($this-&gt;request-&gt;post['payment_gcash_status'])) {
              $data['payment_gcash_status'] = $this-&gt;request-&gt;post['payment_gcash_status'];
          } else {
              $data['payment_gcash_status'] = $this-&gt;config-&gt;get('payment_gcash_status');
          }
  
          if (isset($this-&gt;request-&gt;post['payment_gcash_sort_order'])) {
              $data['payment_gcash_sort_order'] = $this-&gt;request-&gt;post['payment_gcash_sort_order'];
          } else {
              $data['payment_gcash_sort_order'] = $this-&gt;config-&gt;get('payment_gcash_sort_order');
          }
  
          $data['header'] = $this-&gt;load-&gt;controller('common/header');
          $data['column_left'] = $this-&gt;load-&gt;controller('common/column_left');
          $data['footer'] = $this-&gt;load-&gt;controller('common/footer');
  
          $this-&gt;response-&gt;setOutput($this-&gt;load-&gt;view('extension/payment/gcash', $data));
      }
  
      protected function validate() {
          if (!$this-&gt;user-&gt;hasPermission('modify', 'extension/payment/gcash')) {
              $this-&gt;error['warning'] = $this-&gt;language-&gt;get('error_permission');
          }
  
          $this-&gt;load-&gt;model('localisation/language');
  
          $languages = $this-&gt;model_localisation_language-&gt;getLanguages();
  
          foreach ($languages as $language) {
              if (empty($this-&gt;request-&gt;post['payment_gcash_info' . $language['language_id']])) {
                  $this-&gt;error['bank'][$language['language_id']] = $this-&gt;language-&gt;get('error_bank');
              }
          }
  
          return !$this-&gt;error;
      }
  }
  </code></pre>
  <p><strong>View</strong></p>
  <p><strong>Path</strong>: <em>admin\view\template\extension\payment\gcash.twig</em></p>
  <pre><code>&lt;div id=&quot;content&quot;&gt;
    &lt;div class=&quot;page-header&quot;&gt;
      &lt;div class=&quot;container-fluid&quot;&gt;
        &lt;div class=&quot;pull-right&quot;&gt;
          &lt;button type=&quot;submit&quot; form=&quot;form-payment&quot; data-toggle=&quot;tooltip&quot; title=&quot;{{ button_save }}&quot; class=&quot;btn btn-primary&quot;&gt;&lt;i class=&quot;fa fa-save&quot;&gt;&lt;/i&gt;&lt;/button&gt;
          &lt;a href=&quot;{{ cancel }}&quot; data-toggle=&quot;tooltip&quot; title=&quot;{{ button_cancel }}&quot; class=&quot;btn btn-default&quot;&gt;&lt;i class=&quot;fa fa-reply&quot;&gt;&lt;/i&gt;&lt;/a&gt;&lt;/div&gt;
        &lt;h1&gt;{{ heading_title }}&lt;/h1&gt;
        &lt;ul class=&quot;breadcrumb&quot;&gt;
          {% for breadcrumb in breadcrumbs %}
          &lt;li&gt;&lt;a href=&quot;{{ breadcrumb.href }}&quot;&gt;{{ breadcrumb.text }}&lt;/a&gt;&lt;/li&gt;
          {% endfor %}
        &lt;/ul&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class=&quot;container-fluid&quot;&gt;
      {% if error_warning %}
      &lt;div class=&quot;alert alert-danger alert-dismissible&quot;&gt;&lt;i class=&quot;fa fa-exclamation-circle&quot;&gt;&lt;/i&gt; {{ error_warning }}
        &lt;button type=&quot;button&quot; class=&quot;close&quot; data-dismiss=&quot;alert&quot;&gt;&amp;times;&lt;/button&gt;
      &lt;/div&gt;
      {% endif %}
      &lt;div class=&quot;panel panel-default&quot;&gt;
        &lt;div class=&quot;panel-heading&quot;&gt;
          &lt;h3 class=&quot;panel-title&quot;&gt;&lt;i class=&quot;fa fa-pencil&quot;&gt;&lt;/i&gt; {{ text_edit }}&lt;/h3&gt;
        &lt;/div&gt;
        &lt;div class=&quot;panel-body&quot;&gt;
          &lt;form action=&quot;{{ action }}&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot; id=&quot;form-payment&quot; class=&quot;form-horizontal&quot;&gt;
            {% for language in languages %}
            &lt;div class=&quot;form-group required&quot;&gt;
              &lt;label class=&quot;col-sm-2 control-label&quot; for=&quot;input-gcash{{ language.language_id }}&quot;&gt;{{ entry_gcash }}&lt;/label&gt;
              &lt;div class=&quot;col-sm-10&quot;&gt;
                &lt;div class=&quot;input-group&quot;&gt;&lt;span class=&quot;input-group-addon&quot;&gt;&lt;img src=&quot;language/{{ language.code }}/{{ language.code }}.png&quot; title=&quot;{{ language.name }}&quot; /&gt;&lt;/span&gt;
                  &lt;textarea name=&quot;payment_entry_gcash_info{{ language.language_id }}&quot; cols=&quot;80&quot; rows=&quot;10&quot; placeholder=&quot;{{ entry_gcash }}&quot; id=&quot;input-gcash{{ language.language_id }}&quot; class=&quot;form-control&quot;&gt;{% if payment_entry_gcash_info[language.language_id] %}{{ payment_entry_gcash_info[language.language_id] }}{% endif %}&lt;/textarea&gt;
                &lt;/div&gt;
                {% if error_gcash[language.language_id] %}
                &lt;div class=&quot;text-danger&quot;&gt;{{ error_gcash[language.language_id] }}&lt;/div&gt;
                {% endif %}
              &lt;/div&gt;
            &lt;/div&gt;
            {% endfor %}
            &lt;div class=&quot;form-group&quot;&gt;
              &lt;label class=&quot;col-sm-2 control-label&quot; for=&quot;input-total&quot;&gt;&lt;span data-toggle=&quot;tooltip&quot; title=&quot;{{ help_total }}&quot;&gt;{{ entry_total }}&lt;/span&gt;&lt;/label&gt;
              &lt;div class=&quot;col-sm-10&quot;&gt;
                &lt;input type=&quot;text&quot; name=&quot;payment_gcash_total&quot; value=&quot;{{ payment_gcash_total }}&quot; placeholder=&quot;{{ entry_total }}&quot; id=&quot;input-total&quot; class=&quot;form-control&quot; /&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=&quot;form-group&quot;&gt;
              &lt;label class=&quot;col-sm-2 control-label&quot; for=&quot;input-order-status&quot;&gt;{{ entry_order_status }}&lt;/label&gt;
              &lt;div class=&quot;col-sm-10&quot;&gt;
                &lt;select name=&quot;payment_gcash_order_status_id&quot; id=&quot;input-order-status&quot; class=&quot;form-control&quot;&gt;
                  {% for order_status in order_statuses %}
                  {% if order_status.order_status_id == payment_gcash_order_status_id %}
                  &lt;option value=&quot;{{ order_status.order_status_id }}&quot; selected=&quot;selected&quot;&gt;{{ order_status.name }}&lt;/option&gt;
                  {% else %}
                  &lt;option value=&quot;{{ order_status.order_status_id }}&quot;&gt;{{ order_status.name }}&lt;/option&gt;
                  {% endif %}
                  {% endfor %}
                &lt;/select&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=&quot;form-group&quot;&gt;
              &lt;label class=&quot;col-sm-2 control-label&quot; for=&quot;input-geo-zone&quot;&gt;{{ entry_geo_zone }}&lt;/label&gt;
              &lt;div class=&quot;col-sm-10&quot;&gt;
                &lt;select name=&quot;payment_gcash_geo_zone_id&quot; id=&quot;input-geo-zone&quot; class=&quot;form-control&quot;&gt;
                  &lt;option value=&quot;0&quot;&gt;{{ text_all_zones }}&lt;/option&gt;
                  {% for geo_zone in geo_zones %}
                  {% if geo_zone.geo_zone_id == payment_gcash_geo_zone_id %}
                  &lt;option value=&quot;{{ geo_zone.geo_zone_id }}&quot; selected=&quot;selected&quot;&gt;{{ geo_zone.name }}&lt;/option&gt;
                  {% else %}
                  &lt;option value=&quot;{{ geo_zone.geo_zone_id }}&quot;&gt;{{ geo_zone.name }}&lt;/option&gt;
                  {% endif %}
                  {% endfor %}
                &lt;/select&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=&quot;form-group&quot;&gt;
              &lt;label class=&quot;col-sm-2 control-label&quot; for=&quot;input-status&quot;&gt;{{ entry_status }}&lt;/label&gt;
              &lt;div class=&quot;col-sm-10&quot;&gt;
                &lt;select name=&quot;payment_gcash_status&quot; id=&quot;input-status&quot; class=&quot;form-control&quot;&gt;
                  {% if payment_gcash_status %}
                  &lt;option value=&quot;1&quot; selected=&quot;selected&quot;&gt;{{ text_enabled }}&lt;/option&gt;
                  &lt;option value=&quot;0&quot;&gt;{{ text_disabled }}&lt;/option&gt;
                  {% else %}
                  &lt;option value=&quot;1&quot;&gt;{{ text_enabled }}&lt;/option&gt;
                  &lt;option value=&quot;0&quot; selected=&quot;selected&quot;&gt;{{ text_disabled }}&lt;/option&gt;
                  {% endif %}
                &lt;/select&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=&quot;form-group&quot;&gt;
              &lt;label class=&quot;col-sm-2 control-label&quot; for=&quot;input-sort-order&quot;&gt;{{ entry_sort_order }}&lt;/label&gt;
              &lt;div class=&quot;col-sm-10&quot;&gt;
                &lt;input type=&quot;text&quot; name=&quot;payment_gcash_sort_order&quot; value=&quot;{{ payment_gcash_sort_order }}&quot; placeholder=&quot;{{ entry_sort_order }}&quot; id=&quot;input-sort-order&quot; class=&quot;form-control&quot; /&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/form&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p><strong>Language</strong></p>
  <p><strong>Path:</strong> <em>admin\language\en-gb\extension\payment\gcash.php</em></p>
  <pre><code>&lt;?php
  // Heading
  $_['heading_title']      = 'GCash';
  
  // Text
  $_['text_extension']     = 'Extensions';
  $_['text_success']       = 'Success: You have modified GCash details!';
  $_['text_edit']          = 'Edit GCash';
  
  // Entry
  $_['entry_gcash']        = 'GCash Instructions';
  $_['entry_total']        = 'Total';
  $_['entry_order_status'] = 'Order Status';
  $_['entry_geo_zone']     = 'Geo Zone';
  $_['entry_status']       = 'Status';
  $_['entry_sort_order']   = 'Sort Order';
  
  // Help
  $_['help_total']         = 'The checkout total the order must reach before this payment method becomes active.'; 
  
  // Error 
  $_['error_permission']   = 'Warning: You do not have permission to modify payment GCash!';
  $_['error_gcash']        = 'GCash Instructions Required!';
  </code></pre>