first commit

This commit is contained in:
O K
2025-05-29 10:54:49 +03:00
commit cae15fb881
17 changed files with 1604 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
<?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');
}
}