feat: paygw_moneta 1.0.0, MONETA.Assistant payment gateway for Moodle

This commit is contained in:
2026-09-25 16:42:38 +03:00
parent 70464af858
commit 14b386a550
65 changed files with 5377 additions and 59 deletions
+135
View File
@@ -0,0 +1,135 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Строки платёжного шлюза Moneta (английский).
*
* @package paygw_moneta
* @copyright 2026 Moneta Labs {@link https://moneta.ru/}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['pluginname'] = 'Moneta';
$string['gatewayname'] = $string['pluginname'];
$string['gatewaydescription'] = 'Accepting payments by bank cards, via SBP and Pay services';
$string['pluginname_desc'] = "The plugin allows you to receive payments via {$string['pluginname']}";
$string['settingsintro'] = 'Account credentials are set on the payment account: Site administration → Payments → Payment accounts';
$string['accountnumber'] = 'Account number';
$string['accountnumber_help'] = 'Extended account number in MONETA.RU';
$string['integritycode'] = 'Data integrity code';
$string['integritycode_help'] = 'Data integrity code from the extended account settings in MONETA.RU';
$string['paymentserver'] = 'Payment server';
$string['paymentserver_help'] = 'Use the live server for real payments; the demo platform is for checking the connection';
$string['server_demo'] = 'Demo';
$string['server_prod'] = 'Production';
$string['testmode'] = 'Test mode';
$string['testmode_help'] = 'Simulated payment without charging money. Must match the account setting in MONETA.RU';
$string['receiptemail'] = 'Receipt email';
$string['receiptemail_help'] = 'Used in the receipt only when the buyer has neither an email nor a phone in their profile: the fiscal service rejects a receipt without a contact, so it is sent to this address instead (the buyer name stays in the receipt)';
$string['error:receiptemail'] = 'Enter a valid email address of at most 64 characters';
$string['fiscalization'] = 'Fiscal receipts';
$string['fiscalization_help'] = 'Enable only if the kassa.payanyway.ru service is connected to the account: the check request response will contain receipt data';
$string['vat'] = 'VAT rate';
$string['vat_help'] = 'VAT rate for the "course access" receipt line';
$string['vat:none'] = 'No VAT';
$string['vat:vat0'] = 'VAT 0%';
$string['vat:vat5'] = 'VAT 5%';
$string['vat:vat7'] = 'VAT 7%';
$string['vat:vat10'] = 'VAT 10%';
$string['vat:vat20'] = 'VAT 20%';
$string['vat:vat22'] = 'VAT 22%';
$string['vat:vat105'] = 'VAT 5% (calculated rate 5/105)';
$string['vat:vat107'] = 'VAT 7% (calculated rate 7/107)';
$string['vat:vat110'] = 'VAT 10% (calculated rate 10/110)';
$string['vat:vat120'] = 'VAT 20% (calculated rate 20/120)';
$string['vat:vat122'] = 'VAT 22% (calculated rate 22/122)';
$string['sendpaymentlink'] = 'Send payment link by email';
$string['sendpaymentlink_help'] = 'If enabled, the buyer receives a message with a payment link when an order is created, so they can pay later. The link works while the order is unpaid and the price and credentials are unchanged. The channel (email, site notification) follows Moodle notification preferences';
$string['callbackurl'] = 'Notification URL';
$string['callbackurl:copied'] = 'Notification URL copied';
$string['callbackurl_help'] = 'Set this address as both Pay URL and Check URL in the MONETA.RU account settings. It must be reachable from the internet over HTTPS';
$string['checkout:access'] = 'Access to the course opens automatically after payment.';
$string['checkout:course'] = 'Course payment';
$string['checkout:item'] = 'Payment';
$string['checkout:secure'] = "You will be taken to the secure {$string['pluginname']} payment page.";
$string['checkout:total'] = 'Amount due';
$string['confirmpayment'] = "Proceeding to {$string['pluginname']} payment";
$string['pay'] = 'Pay {$a}';
$string['redirecting'] = 'Proceeding to payment…';
$string['paymentconfirmed'] = 'Payment confirmed';
$string['paymentpending'] = 'Waiting for payment confirmation';
$string['paymentpending_help'] = 'Returning from the payment page does not confirm the payment yet. Access is granted after a verified notification from MONETA.RU, usually within a minute';
$string['paymentnotcompleted'] = 'The payment was not completed. You can try again';
$string['genericitem'] = 'Payment in Moodle';
$string['error:orderinprogress'] = 'The previous payment is still being processed. If access does not appear within an hour, contact the site administrator';
$string['environmentrequirephp81'] = 'The paygw_moneta plugin requires PHP 8.1 or later';
$string['messageprovider:payment_received'] = "Payment received ({$string['pluginname']})";
$string['message:paid:subject'] = 'Payment received: {$a->description}';
$string['message:paid'] = 'Hello {$a->firstname},
Your payment of **{$a->amount}** for "{$a->description}" at {$a->sitename} has been received and access is open.
MONETA.RU operation number: {$a->operationid}.
Go to: {$a->url}';
$string['messageprovider:payment_link'] = "Payment link ({$string['pluginname']})";
$string['message:link:subject'] = 'Payment link: {$a->description}';
$string['message:link'] = 'Hello {$a->firstname},
An order for "{$a->description}" of **{$a->amount}** has been created at {$a->sitename}.
Pay: {$a->url}
The link works while the order is unpaid and the price and payment settings are unchanged.';
$string['error:paymentlinkexpired'] = 'This payment link is no longer valid: the order was canceled or the price or payment settings changed. Please start the payment again from the course page';
$string['error:invalidamount'] = 'The payment amount must be greater than zero';
$string['error:unsupportedcurrency'] = "{$string['pluginname']} only supports payments in RUB";
$string['error:accountnumber'] = 'The account number consists of digits only';
$string['error:ordernotfound'] = 'Order not found';
$string['report:title'] = "{$string['pluginname']} orders";
$string['report:time'] = 'Created';
$string['report:user'] = 'Buyer';
$string['report:description'] = 'Order';
$string['report:amount'] = 'Amount';
$string['report:status'] = 'Status';
$string['report:operation'] = 'MONETA.RU operation';
$string['report:lasterror'] = 'Last rejection';
$string['status:new'] = 'Created';
$string['status:pending'] = 'Paying';
$string['status:paid'] = 'Paid';
$string['status:canceled'] = 'Canceled';
$string['status:failed'] = 'Delivery failed';
$string['privacy:metadata:transactions'] = "Orders created when paying through {$string['pluginname']}";
$string['privacy:metadata:transactions:userid'] = 'Buyer';
$string['privacy:metadata:transactions:amount'] = 'Order amount';
$string['privacy:metadata:transactions:status'] = 'Payment status';
$string['privacy:metadata:transactions:merchantorderid'] = 'Order identifier sent to MONETA.RU';
$string['privacy:metadata:transactions:providertransactionid'] = 'Operation number in MONETA.RU';
$string['privacy:metadata:transactions:snapshot'] = 'Snapshot of settings and receipt: course name, buyer full name, e-mail and phone, buyer identifier for MONETA.RU';
$string['privacy:metadata:transactions:timecreated'] = 'Order creation time';
$string['privacy:metadata:moneta'] = 'Data sent to the MONETA.RU payment service to process the payment and issue a receipt';
$string['privacy:metadata:moneta:userid'] = 'Buyer identifier (MNT_SUBSCRIBER_ID): e-mail, otherwise phone, otherwise Moodle user id';
$string['privacy:metadata:moneta:fullname'] = 'Buyer full name for the fiscal receipt';
$string['privacy:metadata:moneta:email'] = 'Buyer e-mail for the receipt';
$string['privacy:metadata:moneta:phone'] = 'Buyer phone for the receipt';
$string['privacy:metadata:moneta:amount'] = 'Payment amount';
+135
View File
@@ -0,0 +1,135 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Строки платёжного шлюза Moneta (русский).
*
* @package paygw_moneta
* @copyright 2026 Moneta Labs {@link https://moneta.ru/}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['pluginname'] = 'Монета';
$string['gatewayname'] = $string['pluginname'];
$string['gatewaydescription'] = 'Приём платежей банковскими картами, через СБП и Pay‑сервисы';
$string['pluginname_desc'] = "Плагин позволяет получать платежи через {$string['pluginname']}";
$string['settingsintro'] = 'Реквизиты счёта задаются в платёжном аккаунте: Администрирование сайта → Платежи → Платёжные аккаунты';
$string['accountnumber'] = 'Номер счёта';
$string['accountnumber_help'] = 'Номер расширенного счёта в системе MONETA.RU';
$string['integritycode'] = 'Код проверки целостности данных';
$string['integritycode_help'] = 'Код проверки целостности данных из настроек расширенного счёта в системе MONETA.RU';
$string['paymentserver'] = 'Сервер платежей';
$string['paymentserver_help'] = 'Для реальных платежей используйте боевой сервер; демо-площадка — для проверки подключения';
$string['server_demo'] = 'Демо';
$string['server_prod'] = 'Боевой';
$string['testmode'] = 'Тестовый режим';
$string['testmode_help'] = 'Имитация оплаты без реального списания средств. Режим должен совпадать с настройкой счёта в MONETA.RU';
$string['receiptemail'] = 'Email для чеков';
$string['receiptemail_help'] = 'Подставляется в чек, только если у покупателя в профиле нет ни e-mail, ни телефона: без контакта касса чек не примет, поэтому он уйдёт на этот адрес (ФИО покупателя в чеке остаётся)';
$string['error:receiptemail'] = 'Укажите корректный e-mail не длиннее 64 символов';
$string['fiscalization'] = 'Фискализация чеков';
$string['fiscalization_help'] = 'Включайте только если к счёту подключён кассовый сервис kassa.payanyway.ru: ответ на проверочный запрос будет содержать данные чека по 54-ФЗ';
$string['vat'] = 'Ставка НДС';
$string['vat_help'] = 'Ставка НДС для позиции «доступ к курсу» в кассовом чеке';
$string['vat:none'] = 'Без НДС';
$string['vat:vat0'] = 'НДС 0%';
$string['vat:vat5'] = 'НДС 5%';
$string['vat:vat7'] = 'НДС 7%';
$string['vat:vat10'] = 'НДС 10%';
$string['vat:vat20'] = 'НДС 20%';
$string['vat:vat22'] = 'НДС 22%';
$string['vat:vat105'] = 'НДС 5% (расчётная ставка 5/105)';
$string['vat:vat107'] = 'НДС 7% (расчётная ставка 7/107)';
$string['vat:vat110'] = 'НДС 10% (расчётная ставка 10/110)';
$string['vat:vat120'] = 'НДС 20% (расчётная ставка 20/120)';
$string['vat:vat122'] = 'НДС 22% (расчётная ставка 22/122)';
$string['sendpaymentlink'] = 'Отправлять ссылку оплаты на почту';
$string['sendpaymentlink_help'] = 'Если включено, при создании заказа покупателю приходит сообщение со ссылкой на оплату — оплатить можно позже. Ссылка действует, пока заказ не оплачен и не изменились цена или реквизиты. Канал (почта, уведомление на сайте) — по настройкам уведомлений Moodle';
$string['callbackurl'] = 'URL для уведомлений';
$string['callbackurl:copied'] = 'URL для уведомлений скопирован';
$string['callbackurl_help'] = 'Укажите этот адрес в настройках счёта MONETA.RU как Pay URL и Check URL. Он должен быть доступен из интернета по HTTPS';
$string['checkout:access'] = 'Доступ к курсу откроется автоматически после оплаты.';
$string['checkout:course'] = 'Оплата курса';
$string['checkout:item'] = 'Оплата';
$string['checkout:secure'] = "Вы перейдёте на защищённую страницу оплаты {$string['pluginname']}.";
$string['checkout:total'] = 'К оплате';
$string['confirmpayment'] = "Переход к оплате через {$string['pluginname']}";
$string['pay'] = 'Оплатить {$a}';
$string['redirecting'] = 'Переходим к оплате…';
$string['paymentconfirmed'] = 'Оплата подтверждена';
$string['paymentpending'] = 'Ожидание подтверждения оплаты';
$string['paymentpending_help'] = 'Возврат с платёжной страницы ещё не подтверждает оплату. Доступ будет открыт после проверенного уведомления от MONETA.RU — обычно в течение минуты';
$string['paymentnotcompleted'] = 'Оплата не была завершена. Вы можете попробовать ещё раз.';
$string['genericitem'] = 'Оплата в Moodle';
$string['error:orderinprogress'] = 'Предыдущая оплата ещё обрабатывается. Если доступ не появился в течение часа, обратитесь к администратору сайта';
$string['environmentrequirephp81'] = 'Плагину paygw_moneta нужен PHP 8.1 или новее';
$string['messageprovider:payment_received'] = "Оплата принята ({$string['pluginname']})";
$string['message:paid:subject'] = 'Оплата принята: {$a->description}';
$string['message:paid'] = 'Здравствуйте, {$a->firstname}!
Ваша оплата **{$a->amount}** за «{$a->description}» на сайте {$a->sitename} принята, доступ открыт.
Номер операции в MONETA.RU: {$a->operationid}.
Перейти: {$a->url}';
$string['messageprovider:payment_link'] = "Ссылка на оплату ({$string['pluginname']})";
$string['message:link:subject'] = 'Ссылка на оплату: {$a->description}';
$string['message:link'] = 'Здравствуйте, {$a->firstname}!
Создан заказ на оплату «{$a->description}» на сумму **{$a->amount}** на сайте {$a->sitename}.
Оплатить: {$a->url}
Ссылка действует, пока заказ не оплачен и не изменились цена или настройки оплаты.';
$string['error:paymentlinkexpired'] = 'Эта ссылка на оплату больше не действует: заказ отменён или изменились цена или настройки оплаты. Начните оплату заново со страницы курса';
$string['error:invalidamount'] = 'Сумма платежа должна быть больше нуля';
$string['error:unsupportedcurrency'] = "{$string['pluginname']} поддерживает платежи только в RUB";
$string['error:accountnumber'] = 'Номер счёта состоит только из цифр';
$string['error:ordernotfound'] = 'Заказ не найден';
$string['report:title'] = "Заказы {$string['pluginname']}";
$string['report:time'] = 'Создан';
$string['report:user'] = 'Покупатель';
$string['report:description'] = 'Заказ';
$string['report:amount'] = 'Сумма';
$string['report:status'] = 'Статус';
$string['report:operation'] = 'Операция MONETA.RU';
$string['report:lasterror'] = 'Последний отказ';
$string['status:new'] = 'Создан';
$string['status:pending'] = 'Оплачивается';
$string['status:paid'] = 'Оплачен';
$string['status:canceled'] = 'Отменён';
$string['status:failed'] = 'Ошибка зачисления';
$string['privacy:metadata:transactions'] = "Заказы, созданные при оплате через {$string['pluginname']}";
$string['privacy:metadata:transactions:userid'] = 'Покупатель';
$string['privacy:metadata:transactions:amount'] = 'Сумма заказа';
$string['privacy:metadata:transactions:status'] = 'Статус оплаты';
$string['privacy:metadata:transactions:merchantorderid'] = 'Идентификатор заказа, переданный в MONETA.RU';
$string['privacy:metadata:transactions:providertransactionid'] = 'Номер операции в MONETA.RU';
$string['privacy:metadata:transactions:snapshot'] = 'Снимок настроек и чека: название курса, ФИО, e-mail и телефон покупателя, идентификатор покупателя для MONETA.RU';
$string['privacy:metadata:transactions:timecreated'] = 'Время создания заказа';
$string['privacy:metadata:moneta'] = 'Данные, передаваемые платёжному сервису MONETA.RU для проведения оплаты и формирования чека';
$string['privacy:metadata:moneta:userid'] = 'Идентификатор покупателя (MNT_SUBSCRIBER_ID): e-mail, иначе телефон, иначе id пользователя в Moodle';
$string['privacy:metadata:moneta:fullname'] = 'ФИО покупателя для кассового чека';
$string['privacy:metadata:moneta:email'] = 'E-mail покупателя для отправки чека';
$string['privacy:metadata:moneta:phone'] = 'Телефон покупателя для отправки чека';
$string['privacy:metadata:moneta:amount'] = 'Сумма оплаты';