<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

/**
 * Description of fail
 *
 * @author Igor Ratsun
 */
class fail extends MX_Controller
{
    protected $page = '';
    
    public function __construct()
    {
        parent::__construct();
        $this->load->config('yandex_kassa/config');
        $this->page = $this->config->item('fail_page');
    }

    public function index()
    {
        if (!empty($this->page)) {
            redirect($this->page);
        }
        $this->output->set_output('Payment fail page');
    }

    public function test()
    {
        if (!empty($this->page)) {
            redirect($this->page);
        }
        $this->output->set_output('Payment fail page (test)');
    }

}
