Search for Resources and Solutions

Add a view file to your Payments gateway

To add a Payments gateway form is important to create your view file. Your view file can be called directly inside the pay method or you can extend it as me to a controller and call the view inside together with your CSS and JS links.

For a view file you can create a folder views inside your gateway directory to be more professionally. Copy the view's file inside the views directory and use the code below to call the view file:



    // Set views params
    set_payment_view(
        $this->CI->load->ext_view(
            PATH_GATEWAY . 'views',
            'main', // main is the file name
            array(), // is the parameters to pass and the keys could be called as variables inside view
            true
        )

    );


Once added, the view file will be displayed in your Payments gateway.

Was this article helpful?