48 lines
1.7 KiB
PHP
48 lines
1.7 KiB
PHP
<?php
|
||
|
||
/**
|
||
* Hutko - Платіжний сервіс, який рухає бізнеси вперед.
|
||
*
|
||
* Запускайтесь, набирайте темп, масштабуйтесь – ми підстрахуємо всюди.
|
||
*
|
||
* @author panariga
|
||
* @copyright 2025 Hutko
|
||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||
*/
|
||
|
||
|
||
if (!defined('_PS_VERSION_')) {
|
||
exit;
|
||
}
|
||
/**
|
||
* Class HutkoRedirectModuleFrontController
|
||
*
|
||
* @property \Hutko $module
|
||
*/
|
||
class HutkoRedirectModuleFrontController extends ModuleFrontController
|
||
{
|
||
|
||
/**
|
||
* Initializes the content of the redirect page for the Hutko payment gateway.
|
||
*
|
||
* This method is responsible for preparing the necessary data and assigning
|
||
* it to the Smarty template that handles the redirection to the Hutko payment
|
||
* service. It calls the parent class's `initContent` method first and then
|
||
* assigns the Hutko checkout URL and the payment input parameters to the template.
|
||
*/
|
||
public function initContent()
|
||
{
|
||
// Call the parent class's initContent method to perform default initializations.
|
||
parent::initContent();
|
||
|
||
// Assign Smarty variables to be used in the redirect template.
|
||
$this->context->smarty->assign([
|
||
'hutko_url' => $this->module->checkout_url, // The URL of the Hutko payment gateway.
|
||
'hutko_inputs' => $this->module->buildInputs(), // An array of input parameters required by Hutko.
|
||
]);
|
||
|
||
// Set the template to be used for displaying the redirection form.
|
||
$this->setTemplate('module:' . $this->module->name . '/views/templates/front/redirect.tpl');
|
||
}
|
||
}
|