Jump to content

404 error when redirected to module controller


OctagonMD

Recommended Posts

My payment module redirects user to a controller which in turn sets a template.

Unfortunately, redirect results in 404 error.

public function getExternalPaymentOption()
    {
        $externalOption = new PaymentOption();
        $externalOption->setCallToActionText($this->l('Pay by Credit/Debit Card'))
                        ->setAction($this->context->link->getModuleLink($this->name, 'payment', array(), true))
                        ->setInputs([
                            'TRTYPE' => [
                                'name' =>'TRTYPE',
                                'type' =>'hidden',
                                'value' =>'0'
                            ]
                        ])
                       ->setAdditionalInformation($this->context->smarty->fetch('module:victoriabankgateway/views/templates/hook/displayPayment.tpl'));
        return $externalOption;
    }

The naming of module class:

class VictoriaBankGateway extends PaymentModule

The naming of front controller class:

class VictoriaBankGatewayPaymentModuleFrontController extends ModuleFrontController

 

Edited by OctagonMD (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

I solved it.

I swapped the nginx web server to apache web server. Side note: I also downgraded from PHP7.3 to PHP7.2, due to it being officially recommended in PrestaShop docs.

No code changes were needed. I assume the problem was bad nginx configuration.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...