feat: moneta 2.0, MONETA.Assistant payment module for PHPShop 6.7+

This commit is contained in:
2026-10-27 11:45:22 +03:00
parent 78b7405637
commit f8c12ce44a
82 changed files with 7387 additions and 58 deletions
+55
View File
@@ -0,0 +1,55 @@
<?php
declare(strict_types=1);
namespace MonetaPhpShop\host;
/**
* Ñîäåðæèìîå êàðòî÷êè îïëàòû äëÿ øàáëîíà `templates/payment_forma.tpl`: îïèñàíèå îïëàòû
* (`@payment_info@`), ñóììà ê îïëàòå (`@moneta_total@`) è ôîðìà ñ êíîïêîé èëè òåêñò î ñîñòîÿíèè
* çàêàçà (`@payment_forma@`).
* Âñ¸ — â cp1251, áåç ïåðåêîäèðîâêè: áëîê öåëèêîì ïåðåêîäèðóåò õóê.
*/
final class CheckoutBlock
{
/** @var string */
private $form;
/** @var string */
private $total;
/** @var string */
private $info;
/**
* @param string $total ñóììà ê îïëàòå, HTML ñî çíàêîì âàëþòû âèòðèíû; ïóñòàÿ — çàêàç ñåé÷àñ
* íå îïëàòèòü, ñòðîêè ñóììû íåò
* @param string $info «Îïèñàíèå îïëàòû», ãîòîâûé HTML; òîëüêî âìåñòå ñ ôîðìîé îïëàòû
*/
public function __construct(string $form, string $total = '', string $info = '')
{
$this->form = $form;
$this->total = $total;
$this->info = $info;
}
public function getInfo(): string
{
return $this->info;
}
public function getForm(): string
{
return $this->form;
}
public function getTotal(): string
{
return $this->total;
}
public function isEmpty(): bool
{
return ($this->form === '');
}
}